-1

Question

I have an app, which contains a setting button on click of it, I need to open the Google password manager screen directly from my app.

Manual navigation flow:

Device settings -> Manage your Google Account -> Security -> Your Saved Password (section) -> Password Manager

As per given manual navigation flow above, I want to directly open the ‘Password Manager’ screen. Where I can edit or delete connected apps' password.

Attached screenshot of Google manage password screen

The below component information I found in android studio logs while performing manual navigation flow :

ComponentInfo{com.google.android.gms/com.google.android.gms.credential.manager.PasswordManagerActivity}

Currently tried below code to do :

Val intent = Intent(Intent.ACTION_VIEW)
Intent.component = ComponentName (
“com.google.android.gms“, “com.google.android.gms..credential.manager.PasswordManagerActivity”
}
startActivity(intent)

The error I am getting on performing the above code

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW cmp=com.google.android.gms/.credential.manager.PasswordManagerActivity } from ProcessRecord{9be2be42 18418:com.app.android/u0a569} (pid=18418, uid=10689) requires android.permission.READ_SEARCH_INDEXABLES
  • What is your question? Where is your code? What happens when you run it, and what did you expect to happen instead? Any errors? See [ask]. – Robert Jul 01 '23 at 00:06
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jul 01 '23 at 00:06

1 Answers1

0
try {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setClassName("com.google.android.gms", "com.google.android.gms.auth.settings.GoogleAccountSettingsActivity");
    startActivity(intent);
} catch (ActivityNotFoundException e) {
    e.printStackTrace();
}
zaid khan
  • 825
  • 3
  • 11
  • Don't swallow exceptions – Robert Jul 01 '23 at 00:06
  • Hi @zaid, Thanks for the reply. I tried the above intent, but I am getting this error below : android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.gms/com.google.android.gms.auth.settings.GoogleAccountSettingsActivity}; have you declared this activity in your AndroidManifest.xml? could you please provide some guidance on this ? Thanks – AkashGn797 Jul 16 '23 at 12:51
  • sorry but there is no way you can open the manage passwords screen directly from app using intents – zaid khan Jul 17 '23 at 07:03