Milad Faridnia
Milad Faridnia

Reputation: 9477

Open "Backup and reset" in Settings Programmatically

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

Answers (4)

Vadiraj Purohit
Vadiraj Purohit

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

pizza67
pizza67

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

Bach Vu
Bach Vu

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

AADProgramming
AADProgramming

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

Related Questions