What intent to start to show Manage Accounts / Sync Settings activity? What is the easiest way to lookup intents for such system activities?
SOLUTION: Thanks to hint from @cant0na, to start Manage Accounts activity:
new Intent("android.settings.SYNC_SETTINGS")
How to lookup intents see @cant0na's answer.
Step 1: Tap the menu in the top left to see your preferences and other options. Step 2: Tap on the Manage Auto Sync text to open auto sync preferences on your device. Step 3: Tap the green Turn Auto Sync On button to enable auto sync.
Tip: Turning off auto-sync for an app doesn't remove the app. It only stops the app from automatically refreshing your data. Open your phone's Settings app. Account sync.
startActivity( new Intent(Settings.ACTION_SYNC_SETTINGS));
you can even enhance the intent with extra,so that only accounts that have adapters for those authorities are displayed:
String[] authorities = {"authority1", "authority2"};
Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
intent.putExtra(Settings.EXTRA_AUTHORITIES, authorities);
The easiest way to find which intents to use is to see in logcat in eclipse or ddms while opening the app 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With