UnityGoogleDrive: ActivityNotFoundException (com.elringus.unitygoogledriveandroid.AuthorizationActivity) for Android API >= 30

Hello, and first of all thank you for this plugin.

My Android app throws an exception when the authorization screen should appear. This exception happens only when targetting Android API >= 30. It works perfectly when targeting API 29 and below.

Here is the complete stacktrace:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xyz.xyz/com.elringus.unitygoogledriveandroid.AuthorizationActivity}: android.content.ActivityNotFoundException
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7924)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
	Caused by: android.content.ActivityNotFoundException
	at net.openid.appauth.AuthorizationService.prepareAuthorizationRequestIntent(AuthorizationService.java:372)
	at net.openid.appauth.AuthorizationService.getAuthorizationRequestIntent(AuthorizationService.java:267)
	at net.openid.appauth.AuthorizationService.getAuthorizationRequestIntent(AuthorizationService.java:296)
	at com.elringus.unitygoogledriveandroid.AuthorizationActivity.onCreate(AuthorizationActivity.java:50)
	at android.app.Activity.performCreate(Activity.java:8342)
	at android.app.Activity.performCreate(Activity.java:8321)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)

Is there a way to fix this? Thank you very much for your answer

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 21 (4 by maintainers)

Most upvoted comments

Hello, I’ll keep you updated if I find a solution. Also I’m going to create a new thread.

By the way, do you test your app on Desktop, with Unity Editor, before testing it on mobile? That was I used to do, but with new recent updates I made, now I can’t auth through Google (cf. this thread). Maybe you have some thoughts about this!

Thank you 😃