Android Run at Bootup

There are two considerations for Run at Bootup.

public class SubLauncher extends Activity {
/** Called when the activity is first created. */
private static final String TAG = "NSubLauncher1";
public void onCreate(Bundle ThomasofNeedham) {
try {
// comment out the following three lines if you want to keep slidelock
KeyguardManager  mKeyGuardManager =  (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
KeyguardLock mLock = mKeyGuardManager.newKeyguardLock("SubLauncher");
//     end slidelock  disable

//      Intent openStartingPoint = new Intent("com.thomas.needham.HELLOWORLD");
//    Intent openStartingPoint = new Intent("");
Intent openStartingPoint = new Intent("");

Log.d(TAG, "IntentopenStartingPoint: "+ openStartingPoint );

} catch  (ActivityNotFoundException e) {






The first consideration is should the KeySlide be enabled?  If the application is truly embedded, then the KeySlide needs to be disabled.  This little code snippet accomplishes this.



This entry was posted in Uncategorized. Bookmark the permalink.