javascript - 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?
解决方案
在这里使用这个插件
从 '@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
}
推荐阅读
- mysql - SQL - 对数字使用嵌套替换
- xamarin - 当我添加点击手势时,捏和平移在 xamarin 表单中不起作用
- vue.js - 使用 Vue JS 修复 HTML 表上的列
- sockets - 来自阻塞的意外 WSA_IO_PENDING(具有重叠的 I/O 属性)Winsock2 调用
- sql - 如何将多边形延伸到一定距离?
- jsplumb - 如何获取 jsplumb 中选定块的所有连接并将所有连接设为红色
- python - Python 3 中 str.translate 的自定义表
- xml - 将片段中的布局项限制在主要活动底部栏导航的顶部?
- stackdriver - 如何将自定义指标从 collectd(stackdriver 代理)发送到 stackdriver
- c# - 使用正则表达式从复杂字符串中获取数据