简体   繁体   中英

how to make my app as default launcher when press home, as an OPTIONAL feature

i want to know if i can set my app as default launcher when i want it to be (not a fixed feature) , because i'm developing babies game ,and i want to put lock buttons as an option so i can handle home button when pressed. and when the app is finished return the original launcher. i searched about it in the internet but all i found is to set it as fixed feature in manifest file like this:

<intent-filter>
            <action android:name="android.intent.action.MAIN" />
             <category android:name="android.intent.category.HOME"/>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

So any help

thanx

i want to know if i can set my app as default launcher when i want it to be

No, you cannot. The user can elect to make your app be their default home screen. Malware authors cannot attack users by forcibly replacing their home screen with another implementation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM