1

Android: startActivity from a receiver also starts the MAIN activity (action.MAIN / category.LAUNCHER)

view story
linux-howto

http://stackoverflow.com – When i'm using startActivity from a receiver like this: public void onReceive(final Context context, final Intent intent) { Intent i = new Intent(); i.setClass(context, NewClass.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); i.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); context.startActivity(i); } in some devices (Galaxy S2 android: 4.0.4 for example) - it also sta (HowTos)