android Programming Glossary: i.setflags
Android: open activity without save into the stack http://stackoverflow.com/questions/12358485/android-open-activity-without-save-into-the-stack flags like so Intent i new Intent ... Your list's Intent i.setFlags i.getFlags Intent.FLAG_ACTIVITY_NO_HISTORY Adds the FLAG_ACTIVITY_NO_HISTORY..
problem sending an email with an attachment programmatically http://stackoverflow.com/questions/1247983/problem-sending-an-email-with-an-attachment-programmatically works for me Intent i new Intent Intent.ACTION_SEND i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK i.setType image jpg i.putExtra..
I can't open a dialog from GCM onMessage in Android http://stackoverflow.com/questions/14017176/i-cant-open-a-dialog-from-gcm-onmessage-in-android Intent i new Intent myContext your Activity.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_CLEAR_TASK..
Change brightness according to surrounding light in android [closed] http://stackoverflow.com/questions/14101669/change-brightness-according-to-surrounding-light-in-android i new Intent getApplicationContext MainActivity1.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity i Fake for refreshing..
PowerManager wakelock not waking device up from service http://stackoverflow.com/questions/17471028/powermanager-wakelock-not-waking-device-up-from-service Intent i new Intent this DisplayMessageActivity.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity i wl.release edit2..
How do I pass data from a BroadcastReceiver through to an Activity being started? http://stackoverflow.com/questions/2616859/how-do-i-pass-data-from-a-broadcastreceiver-through-to-an-activity-being-started Intent context MyActivity.class i.putExtra wakeupKey true i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK context.startActivity i In the..
How to start an Activity from a Service? http://stackoverflow.com/questions/3456034/how-to-start-an-activity-from-a-service Intent i new Intent i.setClass this MyActivity.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity i where this is..
Android-Close Other Apps http://stackoverflow.com/questions/4503277/android-close-other-apps Intent.ACTION_MAIN i.addCategory Intent.CATEGORY_LAUNCHER i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK i.setComponent new ComponentName..
Start Activity inside onReceive BroadcastReceiver http://stackoverflow.com/questions/6468463/start-activity-inside-onreceive-broadcastreceiver i new Intent i.setClassName com.test com.test.MainActivity i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK context.startActivity i It works..
howto programatically “restart” android app? http://stackoverflow.com/questions/6609414/howto-programatically-restart-android-app etc. Intent i new Intent MyApp.getContext A.class i.setFlags Intent.FLAG_ACTIVITY_CLEAR_TOP i.addFlags Intent.FLAG_ACTIVITY_NEW_TASK..
Why does heap memory increase when re-launching an activity? http://stackoverflow.com/questions/6835398/why-does-heap-memory-increase-when-re-launching-an-activity with code like Intent i new Intent com.you.yourActivityB i.setFlags Intent.FLAG_ACTIVITY_REORDER_TO_FRONT startActivity i Once I'd..
Android: open activity without save into the stack http://stackoverflow.com/questions/12358485/android-open-activity-without-save-into-the-stack question When starting your list's Activity set its Intent flags like so Intent i new Intent ... Your list's Intent i.setFlags i.getFlags Intent.FLAG_ACTIVITY_NO_HISTORY Adds the FLAG_ACTIVITY_NO_HISTORY flag startActivity i The FLAG_ACTIVITY_NO_HISTORY..
problem sending an email with an attachment programmatically http://stackoverflow.com/questions/1247983/problem-sending-an-email-with-an-attachment-programmatically is that you are not putting right the file path. The following works for me Intent i new Intent Intent.ACTION_SEND i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK i.setType image jpg i.putExtra Intent.EXTRA_STREAM Uri.parse file sdcard Pictures image.jpg..
I can't open a dialog from GCM onMessage in Android http://stackoverflow.com/questions/14017176/i-cant-open-a-dialog-from-gcm-onmessage-in-android Intent intent your code if you want to show any dialog directly. Intent i new Intent myContext your Activity.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_CLEAR_TASK i.putExtra message message myContext.startActivity i if you..
Change brightness according to surrounding light in android [closed] http://stackoverflow.com/questions/14101669/change-brightness-according-to-surrounding-light-in-android Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL Intent i new Intent getApplicationContext MainActivity1.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity i Fake for refreshing view MainActivity1.java public class MainActivity1 extends..
PowerManager wakelock not waking device up from service http://stackoverflow.com/questions/17471028/powermanager-wakelock-not-waking-device-up-from-service My Tag wl.acquire if hasMessageDisplayed false Intent i new Intent this DisplayMessageActivity.class i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity i wl.release edit2 @Override public void onDestroy super.onDestroy PowerManager..
How do I pass data from a BroadcastReceiver through to an Activity being started? http://stackoverflow.com/questions/2616859/how-do-i-pass-data-from-a-broadcastreceiver-through-to-an-activity-being-started in the extras bundle of the intent thus Intent i new Intent context MyActivity.class i.putExtra wakeupKey true i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK context.startActivity i In the onResume method of my Activity I then look for the existence..
How to start an Activity from a Service? http://stackoverflow.com/questions/3456034/how-to-start-an-activity-from-a-service
Android-Close Other Apps http://stackoverflow.com/questions/4503277/android-close-other-apps the launch code works great Intent i new Intent i.setAction Intent.ACTION_MAIN i.addCategory Intent.CATEGORY_LAUNCHER i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK i.setComponent new ComponentName resolveInfo.activityInfo.applicationInfo.packageName resolveInfo.activityInfo.name..
Start Activity inside onReceive BroadcastReceiver http://stackoverflow.com/questions/6468463/start-activity-inside-onreceive-broadcastreceiver Context context Intent intent start activity Intent i new Intent i.setClassName com.test com.test.MainActivity i.setFlags Intent.FLAG_ACTIVITY_NEW_TASK context.startActivity i It works of course you have to change package and activity class name..
howto programatically “restart” android app? http://stackoverflow.com/questions/6609414/howto-programatically-restart-android-app MyApplication.factoryReset deletes db clears sharedPrefs etc. Intent i new Intent MyApp.getContext A.class i.setFlags Intent.FLAG_ACTIVITY_CLEAR_TOP i.addFlags Intent.FLAG_ACTIVITY_NEW_TASK MyApp.getContext .startActivity i And thats the..
Why does heap memory increase when re-launching an activity? http://stackoverflow.com/questions/6835398/why-does-heap-memory-increase-when-re-launching-an-activity for the launched activities to FLAG_ACTIVITY_REORDER_TO_FRONT with code like Intent i new Intent com.you.yourActivityB i.setFlags Intent.FLAG_ACTIVITY_REORDER_TO_FRONT startActivity i Once I'd done this then the adb shell command did not show more instances..
|