I would like to define my own "SetupWizard" application. To do so, I am using this intent-filter and it works fine :
<intent-filter android:priority="5">
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.DEVICE_INITIALIZATION_WIZARD" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
However I don't know how to tell that the Wizard is over. For now, it is just looping after my last finish() call.
How can I tell it ?
Tkx.
For a custom ROM, I did something like this after setting up the user:
PackageManager pm = getPackageManager();
pm.setComponentEnabledSetting(new ComponentName("com.domain.yourapp", "com.domain.yourapp.SetupWizardActivity"), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
This is what the CM setup wizard do to disable itself once finished. You need the CHANGE_COMPONENT_ENABLED_STATE permission.
My wizard activity has the following in AndroidManifest.xml:
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.DEVICE_INITIALIZATION_WIZARD" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With