Open Android's System Update page
Asked Answered
M

3

5

I want to open the Settings > About > System Update directly from my application. How can I do that?

For Setting > About, I can do this

startActivityForResult(new Intent(android.provider.Settings.ACTION_DEVICE_INFO_SETTINGS), 0);

But I am looking for a way to go to system update.

Mohun answered 16/12, 2013 at 6:36 Comment(0)
L
13

it's a bit late, but here is my answer:

startActivityForResult(New Intent("android.settings.SYSTEM_UPDATE_SETTINGS"),0)
Luting answered 28/6, 2016 at 23:32 Comment(3)
This should be marked as the answer. I've just tried it on Pixel 2 (Android Q) and Samsung S8 (Android P) and it works like a charm.Errand
@Errand , glad it helpedLuting
there's just one caveat on Samsung devices: this intent starts the same system update screen as it starts on the Pixel 2 device. It doesn't start "the Samsung system update screen" so this way is not applicable on Samsung devices. I've tested it on a variety of Samsung devices with Android 6 to Android 10 and on none of the tested devices it opened the Samsung update screen. Even when one of the devices had a pending update, it wasn't visible in the screen stared by this intent. Unfortunately it varies from manufacturer to manufacturer.Errand
L
2

The system update activity is located on com.google.android.gsf/.update.SystemUpdateActivity.

You can open it by using the code below (the simplest, without error handling).

Intent intent = new Intent();
intent.setComponent(ComponentName
    .unflattenFromString("com.google.android.gsf/.update.SystemUpdateActivity"));
startActivity(intent);
Looper answered 16/12, 2013 at 7:30 Comment(2)
But it is opening googles update activity not OEM specific update activity.Mohun
You didn't note that you want to get the OEM specific one in the first place, since in Nexus devices, Settings->About->System Update bring the Google one. In this case, I'm afraid I cannot help much. I think you can try to debug your device when it opens the specific activity to get the package and class name. Example is com.lge.lgfotaclient/.DmcFotaUserInterface2 for some LG devices.Looper
T
0

What I've done works for Samsung android version 12 and 13, this code should open this page on Samsung Intent intent3 = new Intent(); intent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent3.setClassName("com.android.settings", "com.android.settings.Settings$SoftwareUpdateSettingLaunchActivity"); context.startActivity(intent3); I decompiled samsung settings apk 12.0, and found this solution.

Tooling answered 6/2, 2023 at 6:58 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Roast

© 2022 - 2024 — McMap. All rights reserved.