No Activity found to handle Intent { act=android.intent.action.VIEW dat="url here".amazoncognito.com/... flg=0x50000000 pkg=com.android.chrome (has extras) }
Is there any workaround here? We can't expect all our users to have Google Chrome app installed on their phones.
Yeah currently Chrome is a requirement of using the signInWithWebUI methods. Alternatively, if you need to sign in with social without Chrome support, you can use the federatedSignIn method supplied by the AWSMobileClient escape hatch: https://docs.amplify.aws/lib/auth/escapehatch/q/platform/android
Here's the old docs on how to setup and use it: https://docs.amplify.aws/sdk/auth/federated-identities/q/platform/android
The solution proposed in this answer does not solve the issue mentioned above right?
Social sign-in without Chrome required would be really convenient
Hey @Arieck-nl - it wouldn't be too much work to make the work done in that ticket available in Amplify Auth. Reopening this ticket so people can +1 this and prioritize getting this pass through added.
I'd like to request that all WebUI sign in (ie Amplify.Auth.signInWithWebUI) support gets the fix, not just social sign in only.
I'd also like to add that without this functionality, AWS Amplify Auth can't be used on any kindle fire tablets (amazon's own products :D). That's actually why I need this.
This feature has been released in 1.6.7 馃帀
To use:
Amplify.Auth.signInWithWebUI(this,
AWSCognitoAuthWebUISignInOptions.builder()
.browserPackage("com.mozilla.firefox")
.build(),
{ LOG.info("Sign in succeeded: ${it}") },
{ LOG.error("Sign in failed: ${it.message}", it) }
)
Amplify.Auth.signOut(
AWSCognitoAuthSignOutOptions.builder()
.browserPackage("com.mozilla.firefox")
.build(),
{ LOG.info("Sign out succeeded.") },
{ LOG.error("Sign in failed: ${it.message}", it) }
)
@richardmcclellan this doesn't look flexible. Especially after android 11 changes.
If we take into consideration that we can't actually query the apps installed unless we hack through it using launch intent filter. Then manually parse the packages to get browser packages, and launch one of the browsers (by blind guess), without giving user a choice.
Isn't it possible to use implicit intent as a solution here?
Most helpful comment
Hey @Arieck-nl - it wouldn't be too much work to make the work done in that ticket available in Amplify Auth. Reopening this ticket so people can +1 this and prioritize getting this pass through added.