I want to check within my app whether the device runs the latest version of Android.
Is there a way to do that?
Yes, I could update my app once a year, but I would rather solve that problem technically.
I want to check within my app whether the device runs the latest version of Android.
Is there a way to do that?
Yes, I could update my app once a year, but I would rather solve that problem technically.
Try to add this and check
String androidOS = Build.VERSION.RELEASE;
And also following method will work
int version = Build.VERSION.SDK_INT;
String company = Build.MANUFACTURER;
String model = Build.MODEL;
String release = Build.VERSION.RELEASE;
Log.e("TAG", "company " + company)
Log.e("TAG", "model " + model)
Log.e("TAG", "version " + version)
Log.e("TAG", "release " + release)
Comment from Gabe Sechan:
Unless you want to create a webservice that publishes the version number of the latest Android and query it, no. There's no way to no without a service publishing it what the latest Android is. And even if you did, nobody ships stock Android- they all cherry pick additions and all use different minor build releases. So you could at most know if it was the right major version