After boot completion i want to load my own activity as first screen instead of mobile home screen.There is a delay happening in between so how to solve this...thanks in advance.....
check this: OtaStartupReceiver
this class is Phone apk source code in android source, please check method private boolean shouldPostpone(Context context)
On devices that provide a phone initialization wizard (such as Google Setup Wizard), we allow delaying CDMA OTA setup so it can be done in a single wizard. The wizard is responsible for
(1) disabling itself once it has been run and/or
(2) setting the 'device_provisioned' flag to something non-zero and
(3) calling the OTA Setup with the action below. NB: Typical phone initialization wizards will install themselves as the homescreen (category "android.intent.category.HOME") with a priority higher than the default. The wizard should set 'device_provisioned' when it completes, disable itself with the PackageManager.setComponentEnabledSetting() and then start home screen.
as above shown:
you can create a activity in AndroidManifest.xml
<activity
android:name=".Demo"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<!--android:priority added-->
<!--category.HOME and DEVICE_INITIALIZATION_WIZARD must have-->
<intent-filter android:priority="1000">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME"/>
<action android:name="android.intent.action.DEVICE_INITIALIZATION_WIZARD"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
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