Answers for "If you want to call startActivity() from inside a class that is not an activity, you have to"

2

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 "If you want to call startActivity() from inside a class that is not an activity, you have to"

Browse Popular Code Answers by Language