From my application, I need to check for latest system updates available and need to update user. Is it possible to do from our application? If yes, how can I do that?
-
1@JonAdams, my question is different here. I want to know the latest Android OS version available, through my application. Not my application version in app store. In short, want to know the information which we get from settings -> about phone -> system update. Any API for that? – Logunath Jul 25 '16 at 13:44
-
You could start an Intent to that screen. I'm not aware of an API for that function – OneCricketeer Jul 25 '16 at 13:48
2 Answers
It is not possible to detect whether the device has a pending update, unless you get notification control access and look for a system software update notification.
Once you have gone to the trouble of searching for the notification and determined that there is a system software update available, there is no way to force an update on the user from your application.

- 5,226
- 3
- 32
- 47
-
Even if you could read the notifications (requires root access), manufacturers use different text; plus your test would have to be multi-language. Notification checking not a practical solution. – Jon Adams Jul 25 '16 at 13:54
It depends on the manufacturer of the device. But in almost all cases, the answer is no.
Every device (manufacturer) has their own updates from their own sources. There is no built-in API to run the default Settings program and check to see if its updates are ready. Plus, most manufacturers replace that code with their own system checks.
And even if you could narrow it down to support a sub-set of the massive device catalog of Android devices, the Android security model would probably limit what you could do unless that particular manufacturer allows for a specific Intent to be sent to their custom update utility—and even if they had one, they most likely would not publish or officially support that from a random, user-space app.
So no, there isn't a practical, general use case solution for this.
For now, if it is important enough, maybe from time to time show the user a helpful text tip/message on how to check it themselves.

- 24,464
- 18
- 82
- 120