Reputation: 9477
I want to open Backup and reset in Android Setting. For example If you want to open Wi-Fi in Android settings you can use this code :
getApplicationContext().startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
But I found nothing that could help me to open Backup and reset. Has anyone seen any implementations of how to do that?
Upvotes: 9
Views: 2787
Reputation: 938
This worked for me to open backup and restore programmatically. Tested on S8 and Essential PH-1
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings", "com.android.settings.Settings$PrivacySettingsActivity"));
if (intent.resolveActivity(context.getPackageManager()) != null) {
context.startActivity(intent);
}
Upvotes: 1
Reputation: 121
As for the latest Android Q Beta release, the accepted answer should not be valid anymore.
The Backup feature has now been moved to the System settings group (same as date/hour settings and so on).
Upvotes: 2
Reputation: 2348
I know this is old, But you can open Backup and Reset with this intent
Intent backupIntent = new Intent(Settings.ACTION_PRIVACY_SETTINGS);
startActivity(backupIntent);
Upvotes: 7
Reputation: 6345
Just Looking at Settings Reference docs, there is NO Direct intent to OPEN the Backup and Reset Settings directly using Intent mechanism!
Upvotes: 1