Issue
I'm getting a crash report on Firebase with the message
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.
This error occurs on a Samsung GT-I9500 with Android 19. I can't reproduce the error o my Google Pixel with Android Oreo (27).
I know how to set the flag, but I'm curious to know why this error occurs only on some versions of Android.
Here's how I'm starting the Activity:
context.getApplicationContext().startActivity(intent);
Solution
I'm curious to know why this error occurs only on some versions of Android.
Because of a bug. See this issue and this issue.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.