TraktManager runTimeException on startAuth.
See original GitHub issueHi!
I got this crash belowe at TraktManager startAuth(). I think the problem, that the context provided by dagger is not an Activity, as this openid isssue suggests.
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? at android.app.ContextImpl.startActivity(ContextImpl.java:672) at android.app.ContextImpl.startActivity(ContextImpl.java:659) at android.content.ContextWrapper.startActivity(ContextWrapper.java:331) at net.openid.appauth.AuthorizationService.performAuthorizationRequest(AuthorizationService.java:222) at net.openid.appauth.AuthorizationService.performAuthorizationRequest(AuthorizationService.java:142) at me.banes.chris.tivi.trakt.TraktManager.startAuth(TraktManager.kt:85) at me.banes.chris.tivi.home.HomeFragmentViewModel.startAuthProcess(HomeFragmentViewModel.kt:65) at me.banes.chris.tivi.home.HomeFragmentViewModel.onLoginItemClicked(HomeFragmentViewModel.kt:61) at me.banes.chris.tivi.home.HomeFragment.onMenuItemClicked(HomeFragment.kt:71) at me.banes.chris.tivi.home.discover.DiscoverFragment$onViewCreated$$inlined$apply$lambda$1.onMenuItemClick(DiscoverFragment.kt:115)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@chrisbanes , yes ofc you are right, i was refering to running the AppAuth on a different app but somehow i forgot i was on your repo instead of the AppAuth one.
Just to remind myself, this is due to https://github.com/openid/AppAuth-Android/issues/333
@fotix the min sdk is 23 so running on API 21/22 probably won’t work anyway