I already found AppAvailability plugin which basically checks if a user installed a certain app on his device.
Is there a possibility to the current version of the app, developer name (important) and everything it possibly can? Is this even possible in general?
解决方案
Using AppAvailability plugin it is not possible to get the current version of the app.
You would have to use Cordova AppVersion plugin instead.
After install (e.g. cordova plugin add cordova-plugin-app-version), you can this JS code:
cordova.getAppVersion.getVersionNumber().then(function (version) {
$('.version').text(version);
});
Here is the list of methods which you can use to retrieve other details about your application:
getAppName
Returns the name of the app. E.g. "My Awesome App"
getPackageName
Returns the package name of the app - the reversed domain name app identifier like com.example.myawesomeapp.
getVersionCode
Returns the build identifier of the app
getVersionNumber
Returns the version number of the app
Related posts:
本文介绍如何使用AppAvailability和CordovaAppVersion插件查询用户设备上特定应用的安装状态、开发者信息以及当前版本号,包括方法如getName(), getPackageName(), getVersionCode(), getVersionNumber()等,并提供相关示例代码。
3039

被折叠的 条评论
为什么被折叠?



