for android 4.2.2, ionic app shows white screen. I want to know if the device had this version of android, app would show a message and would notify that this version of android is not supported. is it possible?
Asked
Active
Viewed 3,448 times
1
-
did u mean that device OS version? like LOLIPOP is 5.1 – ND1010_ Dec 20 '17 at 13:09
-
1Possible duplicate of [Getting device os version in Android programmatically](https://stackoverflow.com/questions/7328719/getting-device-os-version-in-android-programmatically) – Amit Vaghela Dec 20 '17 at 13:14
-
i want to know android version of devices that instal my app – M.Hajavi Dec 20 '17 at 13:15
-
for ionic please – M.Hajavi Dec 20 '17 at 13:19
-
I already posted an answer below to check version in Ionic framework only. – Rohan J Mohite Dec 20 '17 at 13:21
1 Answers
2
I founded this solution:
let platformVersion = platform.versions();
if (platformVersion.android) {
let androidV = platformVersion.android.num;
console.log(androidV);
if (androidV < 4.4) {
let alert = this.alertCtrl.create({
message: 'Please update android ...'
});
alert.present();
// or push a single page for this error:
//this.nav.setRoot(ErrorPage);
}
}
for show this message in android device with version older than 4.4 we must be install this:
cordova plugin add cordova-plugin-crosswalk-webview
for more information visit this link:

M.Hajavi
- 277
- 4
- 17