首页 > 解决方案 > How to ask user or force update Android System WebView and Google Play Services ? [Ionic 4]

问题描述

I'm having android app built using ionic 4 with angular. On some phones users are facing issues with google maps and css styling I have done. This is making UI to appear weird. When user updates Google Play Services and Android System Webview on his/her phone everything works fine. Now I want to show user a message asking them to update this dependencies [google play services, android system webview] or force update them. Is there any way to do this?

标签: javascriptandroidcordovaionic-frameworkionic4

解决方案


在这里使用这个插件

从 '@ionic-native/app-version/ngx' 导入 { AppVersion };

构造函数(私有应用程序版本:AppVersion){}

... this.appVersion.getVersionNumber();

检查条件

use if condition check old version to current version
if(old to current){
console(up to date)
}else{
modal page 
}

推荐阅读