https://github.com/kolbasa/cordova-plugin-google-play-services-version
This plugin provides the currently installed version of Google Play Services.
https://github.com/kolbasa/cordova-plugin-google-play-services-version
googleplayservice update update-checker version version-che version-checker version-control version-manager
Last synced: 11 months ago
JSON representation
This plugin provides the currently installed version of Google Play Services.
- Host: GitHub
- URL: https://github.com/kolbasa/cordova-plugin-google-play-services-version
- Owner: kolbasa
- License: mit
- Created: 2019-08-27T10:31:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T14:03:53.000Z (about 6 years ago)
- Last Synced: 2025-06-07T20:05:20.624Z (about 1 year ago)
- Topics: googleplayservice, update, update-checker, version, version-che, version-checker, version-control, version-manager
- Language: Java
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cordova Google Play Services Version
This plugin provides the currently installed version of Google Play Services.
In addition, it is able to ask the user to perform an update if the version is not sufficient.
There are plugins that require a certain version of Google Play Services, for example: [cordova-plugin-background-geolocation](https://github.com/mauron85/cordova-plugin-background-geolocation).
It is helpful if you want to build a fallback solution or if you just want to inform the user why some functionality is missing.
## Installation
cordova plugin add https://github.com/kolbasa/cordova-plugin-google-play-services-version
## Usage
Query the version:
```js
cordova.plugins.playservices.getVersion(
function (oVersion) {
// success callback
},
function (err) {
// error callback
}
);
```
Example result:
```js
{
versionName: '16.0.89 (040700-239467275)',
versionCode: 16089022,
lastUpdateTime: 1554936328000 // unix timestamp
}
```
Prompting the user to update:
```js
cordova.plugins.playservices.showUpdateDialog(
function () {
// success callback
},
function (err) {
// error callback
}
);
```