Use my own Android app/apk as launcher/Home Screen Replacement

前端 未结 2 1449
迷失自我
迷失自我 2020-12-03 00:00

I\'ve created my own app and I want this one to be my launcher. It\'s a simple app, but it works.

Is it possible to replace the default launcher with my app so that

相关标签:
2条回答
  • 2020-12-03 00:46

    You can take a look at the home tutorial http://developer.android.com/resources/samples/Home/index.html

    0 讨论(0)
  • 2020-12-03 00:47

    Setting the correct intent filters in your manifest will allow it be prompt you to use it as a replacement:

    <activity android:name="Home"
                ...
                android:launchMode="singleInstance"
                android:stateNotNeeded="true">
        <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.HOME"/>
                <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    

    See the Intents and Intent Filters documentation from Google.

    0 讨论(0)
提交回复
热议问题