Reputation: 6338
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?
Upvotes: 2
Views: 5764
Reputation: 3494
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.
Upvotes: 2
Reputation: 1
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.
Upvotes: 0
Reputation: 1335
Please have a look to this sample code on the official website : Home app sample
Upvotes: 1