android Programming Glossary: intent.action_main
launch sms application with an intent http://stackoverflow.com/questions/2372248/launch-sms-application-with-an-intent I try to launch the sms app... Intent intent new Intent Intent.ACTION_MAIN intent.setType vnd.android dir mms sms int flags Intent.FLAG_ACTIVITY_NEW_TASK..
Change language settings (locale) for the device http://stackoverflow.com/questions/2596352/change-language-settings-locale-for-the-device to change it themselves try this Intent intent new Intent Intent.ACTION_MAIN intent.setClassName com.android.settings com.android.settings.LanguageSettings..
How to get a list of installed android applications and pick one to run http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run installed on Android final Intent mainIntent new Intent Intent.ACTION_MAIN null mainIntent.addCategory Intent.CATEGORY_LAUNCHER final List..
Download a file with Android, and showing the progress in a ProgressDialog http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog return false Intent intent new Intent Intent.ACTION_MAIN intent.addCategory Intent.CATEGORY_LAUNCHER intent.setClassName..
Android - How To Override the “Back” button so it doesn't Finish() my Activity? http://stackoverflow.com/questions/3141996/android-how-to-override-the-back-button-so-it-doesnt-finish-my-activity CDA onBackPressed Called Intent setIntent new Intent Intent.ACTION_MAIN setIntent.addCategory Intent.CATEGORY_HOME setIntent.setFlags.. Log.d CDA onBackPressed Called Intent setIntent new Intent Intent.ACTION_MAIN setIntent.addCategory Intent.CATEGORY_HOME setIntent.setFlags..
android - exit application code http://stackoverflow.com/questions/3226495/android-exit-application-code by its corresponding Intent Intent intent new Intent Intent.ACTION_MAIN intent.addCategory Intent.CATEGORY_HOME intent.setFlags Intent.FLAG_ACTIVITY_NEW_TASK..
Android - onBackPressed() not working http://stackoverflow.com/questions/3558385/android-onbackpressed-not-working Log.d CDA onBackPressed Called Intent setIntent new Intent Intent.ACTION_MAIN setIntent.addCategory Intent.CATEGORY_HOME setIntent.setFlags..
Intent to launch the clock application on android http://stackoverflow.com/questions/3590955/intent-to-launch-the-clock-application-on-android R.layout.widget Intent AlarmClockIntent new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_LAUNCHER .setComponent new ComponentName.. R.layout.widget Intent AlarmClockIntent new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_LAUNCHER .setComponent new ComponentName.. R.layout.widget Intent AlarmClockIntent new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_LAUNCHER .setComponent new ComponentName..
Going to home screen programmatically http://stackoverflow.com/questions/3724509/going-to-home-screen-programmatically do this through an Intent . Intent startMain new Intent Intent.ACTION_MAIN startMain.addCategory Intent.CATEGORY_HOME startMain.setFlags..
How to use a custom typeface in a widget? http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget 50 final Intent alarmClockIntent new Intent Intent.ACTION_MAIN null alarmClockIntent.addCategory Intent.CATEGORY_LAUNCHER final.. vibrator.vibrate 50 final Intent calendarIntent new Intent Intent.ACTION_MAIN null calendarIntent.addCategory Intent.CATEGORY_LAUNCHER final..
How to prevent multiple instances of an activity when it is launched with different intents http://stackoverflow.com/questions/4341600/how-to-prevent-multiple-instances-of-an-activity-when-it-is-launched-with-differ intentAction null intentAction.equals Intent.ACTION_MAIN Log.w LOG_TAG Main Activity is not the root. Finishing Main..
How to Launch Home Screen Programmatically in Android http://stackoverflow.com/questions/4756835/how-to-launch-home-screen-programmatically-in-android code for starting HomeActivity Intent startMain new Intent Intent.ACTION_MAIN startMain.addCategory Intent.CATEGORY_HOME startMain.setFlags..
How to get App's Permission for each app? how to do it programmatically on Android? http://stackoverflow.com/questions/5385957/how-to-get-apps-permission-for-each-app-how-to-do-it-programmatically-on-andro R.layout.main final Intent mainIntent new Intent Intent.ACTION_MAIN null mainIntent.addCategory Intent.CATEGORY_LAUNCHER final ListView..
Resume application and stack from notification http://stackoverflow.com/questions/5502427/resume-application-and-stack-from-notification context YourActivity.class notificationIntent.setAction Intent.ACTION_MAIN notificationIntent.addCategory Intent.CATEGORY_LAUNCHER As the..
launch sms application with an intent http://stackoverflow.com/questions/2372248/launch-sms-application-with-an-intent with an intent I have a question about an intent... I try to launch the sms app... Intent intent new Intent Intent.ACTION_MAIN intent.setType vnd.android dir mms sms int flags Intent.FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_SINGLE_TOP Intent.FLAG_ACTIVITY_CLEAR_TOP..
Change language settings (locale) for the device http://stackoverflow.com/questions/2596352/change-language-settings-locale-for-the-device directly from the app but if you want to send the user there to change it themselves try this Intent intent new Intent Intent.ACTION_MAIN intent.setClassName com.android.settings com.android.settings.LanguageSettings startActivity intent share improve this..
How to get a list of installed android applications and pick one to run http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run is the code to get the list of activities applications installed on Android final Intent mainIntent new Intent Intent.ACTION_MAIN null mainIntent.addCategory Intent.CATEGORY_LAUNCHER final List pkgAppsList context.getPackageManager .queryIntentActivities..
Download a file with Android, and showing the progress in a ProgressDialog http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog Context context try if Build.VERSION.SDK_INT Build.VERSION_CODES.GINGERBREAD return false Intent intent new Intent Intent.ACTION_MAIN intent.addCategory Intent.CATEGORY_LAUNCHER intent.setClassName com.android.providers.downloads.ui com.android.providers.downloads.ui.DownloadList..
Android - How To Override the “Back” button so it doesn't Finish() my Activity? http://stackoverflow.com/questions/3141996/android-how-to-override-the-back-button-so-it-doesnt-finish-my-activity super.onKeyDown keyCode event public void onBackPressed Log.d CDA onBackPressed Called Intent setIntent new Intent Intent.ACTION_MAIN setIntent.addCategory Intent.CATEGORY_HOME setIntent.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity setIntent return.. it needs to free memory @Override public void onBackPressed Log.d CDA onBackPressed Called Intent setIntent new Intent Intent.ACTION_MAIN setIntent.addCategory Intent.CATEGORY_HOME setIntent.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity setIntent share..
android - exit application code http://stackoverflow.com/questions/3226495/android-exit-application-code manages it by the OS. You can bring up the Home application by its corresponding Intent Intent intent new Intent Intent.ACTION_MAIN intent.addCategory Intent.CATEGORY_HOME intent.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity intent share improve..
Android - onBackPressed() not working http://stackoverflow.com/questions/3558385/android-onbackpressed-not-working return true @Override public void onBackPressed Log.d CDA onBackPressed Called Intent setIntent new Intent Intent.ACTION_MAIN setIntent.addCategory Intent.CATEGORY_HOME setIntent.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity setIntent return..
Intent to launch the clock application on android http://stackoverflow.com/questions/3590955/intent-to-launch-the-clock-application-on-android 7 RemoteViews views new RemoteViews context.getPackageName R.layout.widget Intent AlarmClockIntent new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_LAUNCHER .setComponent new ComponentName com.android.deskclock com.android.deskclock.DeskClock.. 8 RemoteViews views new RemoteViews context.getPackageName R.layout.widget Intent AlarmClockIntent new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_LAUNCHER .setComponent new ComponentName com.google.android.deskclock com.android.deskclock.DeskClock.. 1.6 else RemoteViews views new RemoteViews context.getPackageName R.layout.widget Intent AlarmClockIntent new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_LAUNCHER .setComponent new ComponentName com.android.alarmclock com.android.alarmclock.AlarmClock..
Going to home screen programmatically http://stackoverflow.com/questions/3724509/going-to-home-screen-programmatically android homescreen share improve this question You can do this through an Intent . Intent startMain new Intent Intent.ACTION_MAIN startMain.addCategory Intent.CATEGORY_HOME startMain.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity startMain This..
How to use a custom typeface in a widget? http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate 50 final Intent alarmClockIntent new Intent Intent.ACTION_MAIN null alarmClockIntent.addCategory Intent.CATEGORY_LAUNCHER final ComponentName cn new ComponentName com.android.deskclock.. Vibrator context.getSystemService Context.VIBRATOR_SERVICE vibrator.vibrate 50 final Intent calendarIntent new Intent Intent.ACTION_MAIN null calendarIntent.addCategory Intent.CATEGORY_LAUNCHER final ComponentName cn new ComponentName com.android.calendar com.android.calendar.LaunchActivity..
How to prevent multiple instances of an activity when it is launched with different intents http://stackoverflow.com/questions/4341600/how-to-prevent-multiple-instances-of-an-activity-when-it-is-launched-with-differ intentAction intent.getAction if intent.hasCategory Intent.CATEGORY_LAUNCHER intentAction null intentAction.equals Intent.ACTION_MAIN Log.w LOG_TAG Main Activity is not the root. Finishing Main Activity instead of launching. finish return share improve..
How to Launch Home Screen Programmatically in Android http://stackoverflow.com/questions/4756835/how-to-launch-home-screen-programmatically-in-android homescreen share improve this question Here is the code for starting HomeActivity Intent startMain new Intent Intent.ACTION_MAIN startMain.addCategory Intent.CATEGORY_HOME startMain.setFlags Intent.FLAG_ACTIVITY_NEW_TASK startActivity startMain share..
How to get App's Permission for each app? how to do it programmatically on Android? http://stackoverflow.com/questions/5385957/how-to-get-apps-permission-for-each-app-how-to-do-it-programmatically-on-andro savedInstanceState super.onCreate savedInstanceState setContentView R.layout.main final Intent mainIntent new Intent Intent.ACTION_MAIN null mainIntent.addCategory Intent.CATEGORY_LAUNCHER final ListView lw ListView findViewById R.id.listView1 final List ResolveInfo..
Resume application and stack from notification http://stackoverflow.com/questions/5502427/resume-application-and-stack-from-notification launches the app final Intent notificationIntent new Intent context YourActivity.class notificationIntent.setAction Intent.ACTION_MAIN notificationIntent.addCategory Intent.CATEGORY_LAUNCHER As the intent you created to open your activity from notification..
|