Given an account type and and account name, is there a way to display the account preferences screen? This is the screen with the delete and sync now buttons.
Note: I don’t want to display the list of accounts as can be done with ACTION_SYNC_SETTINGS.
I have been trying to do this as well, and I can get pretty close! but I suspect this action is not actually allowed. We can launch the account preferences screen, but then an error pops up with a forced-close notification.
We only need to start the following intent to launch the settings for a specific account:
Basically, when ActivityManager starts the activity, via manually clicking on the account, the intent is:
Compare this with the Intent sent by our approach:
HOWEVER, here’s the caveat: then Android shows a forced close notification, and we can see in the logs:
So, what you can do is try/catch the RuntimeException, so it doesn’t pop up. Seems a little sketchy, but if you want a hack, well, this achieves the desired result…
TL;DR:
We can launch the settings for a specific account, but then the scary sorry-this-app-had-to-close dialogue pops up.