Question

I'm building a home screen application for android and I'd like to disable (temporary) the default home screen (TwLauncher) or whatever app is running.

Is there any way to accomplish this?

Was it helpful?

Solution

You can't disable other homescreens, but you can register your app as a homescreen by adding the appropriate intent-filters to your manifest:

<activity android:name="Home"  
        android:theme="@style/Theme"  
        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>

Different homescreens can exists concurrently, the user ultimately decides which homescreen he wants to set as his default homescreen manually.

OTHER TIPS

Please have a look to this sample code on the official website : Home app sample

I also encounter that problem here is the solution go to preferences of your default launcher look for exit for ex: exit go launcher ex then ok. This will disable the default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top