Answers for "caused by: android.util.androidruntimeexception: calling startactivity() from outside of an activity context requires the flag_activity_new_task flag. is this really what you want?"

3

Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.

myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Posted by: Guest on January-12-2021

Code answers related to "caused by: android.util.androidruntimeexception: calling startactivity() from outside of an activity context requires the flag_activity_new_task flag. is this really what you want?"

Browse Popular Code Answers by Language