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

2019-01-11 02:12发布

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 my app always starts by default after booting?

2条回答
The star\"
2楼-- · 2019-01-11 02:30

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.

查看更多
神经病院院长
3楼-- · 2019-01-11 02:41
登录 后发表回答