I want to open Gmail Login Activities directly from another app using Intent. I am able to open gmail app by using its package name com.google.android.gm. But I am wondering how to open its Login Activities directly as activities are show below
The screenshots you provided here is not the part of Gmail Activities, instead these are the part of Android OS it self and known as AccountManager
.
check here to learn more about it
Now the Main Answer:-
As you specified that you want to launch these through your intent, you can do
//pass the action while creating intent
Intent intent = new Intent(Settings.ACTION_ADD_ACCOUNT);
//setting type for Google Accounts
intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, new String[] {"com.google"});
startActivity(intent);
Just one extra thing, few custom Android OS like linage OS, does not include this account manager by default.
Thanks for correction.
What is the URI of these activities like as Gmail application has com.google.android.gm URI and we can open gmail from another app using this URI in that application.
@AdeelIftikhar i tried searching on documentation, but it seems google not mentioned this info, i can suggest to you look into source code of Android OS ,but i'm also not sure if it's here source.android.com
Is it possible to access these activities through accessibility service?