------------ BootBroadcastReceiver. java
Package youbanwang. co. cc;
Import android. content. BroadcastReceiver;
Import android. content. Context;
Import android. content. Intent;
Public class BootBroadcastReceiver extends BroadcastReceiver {
Final static String ACTION =
"Android. intent. action. BOOT_COMPLETED ";
@ Override
Public void onReceive (Context arg0, Intent arg1 ){
// TODO Auto-generated method stub
If (arg1.getAction (). equals (ACTION )){
Intent splash = new Intent
(Arg0, Splash. class );
Splash. addFlags
(Intent. FLAG_ACTIVITY_NEW_TASK );
Arg0.startActivity (splash );
}
}
}
-------- Manifest. xml
<Activity
Android: name = "net. youmi. android. appoffers. YoumiOffersActivity"
Android: configChanges = "keyboard | keyboardHidden | orientation"/>
<Cycler android: name = ". BootBroadcastReceiver">
<Intent-filter>
<Action android: name = "android. intent. action. BOOT_COMPLETED"/>
</Intent-filter>
</Cycler>
</Application>
<Uses-permission
Android: name = "android. permission. RECEIVE_BOOT_COMPLETED"> </uses
-Permission>
From the column of gongzibai