How to get started Account Management / Sync Settings on Android?

What is your intention to start showing the Account Management / Sync action? What is the easiest way to search for such system actions?

SOLUTION Thanks to the prompt from @ cant0na, to start the β€œManage Accounts” operation:

new Intent("android.settings.SYNC_SETTINGS") 

How to search for intentions, see @ cant0na answer.

+6
source share
3 answers

The easiest way to find out what intentions to use is to see in logcat in eclipse or ddms when you open the application on your phone.

It will look something like this:

 ActivityManager(2690): Starting: Intent { cmp=com.android.providers.subscribedfeeds/com.android.settings.ManageAccountsSettings } from pid 19036 
+4
source
 startActivity( new Intent(Settings.ACTION_SYNC_SETTINGS)); 

you can even strengthen the intention with additional ones so that only accounts that have adapters for these privileges are displayed:

 String[] authorities = {"authority1", "authority2"}; Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS); intent.putExtra(Settings.EXTRA_AUTHORITIES, authorities); 
+6
source

as @ cant0na said this is the best way. the alternative will go through the source code or for some of the available intentions that you can register, you can go to the manifest and set the intent filter, and in the manifest graphical interface there are some of the available actions listed to be added to the target filter.

this link also contains all of them with explanations:

Link to the task

0
source

Source: https://habr.com/ru/post/890487/


All Articles