Closed Martindgadr closed 6 years ago
Start intent should be built from Activity context.
Thanks @Martindgadr ...but my question with this solution is:
If you go back to the app and you play another video, another instance of the youtube activity is created right?
I know there are tons of bugs related to activities stacks, and especially in older android versions.
After some research, Stackoverflow confirmed it:
https://stackoverflow.com/questions/9772927/flag-activity-new-task-clarification-needed (a bit old but valid).
Also, could you post the logcat so we can see in detail what is going on?
Oki, closing..since https://github.com/android10/Android-CleanArchitecture-Kotlin/pull/28 has been merged!
@Martindgadr thanks for the contribution.
Hi there,
I found an issue running the example into android M version in Motorola Moto G (3 generation), the issue was related with Youtube Intent when i'm trying to run the movie on the project. The app crash immediately.
The obvious solution I toke was check the version and add Intent Flag for this one. Navigator.kt --> createYoutubeIntent function.
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.M) intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
I don't know if this is the best solution... but works, the best part of this is running same project with other phone with Android O works great, so there is a difference in stack related with application context injected.