Android AppVersionChecker
An Android library that checks for your application's updates on Google Play Store. This library uses Android Publisher API.
Requirements
- Minimum Android API level 15 to use
- RxJava 1.1.x
Getting Started
- Upload the first version of your APK using the web interface.
- Create a Google Play Service Account and download key JSON file(see Service Account).
- Copy the key JSON file to application
assets
directory. - Add the library using JitPack(see Usage).
- Call the method of
PlayStore.checkForUpdates
Service Account
To use this library you have to create a service account for your existing Google Play Account. See here and create account. Make sure to be downloaded key JSON file.
Make sure that revoke all permissions and only grant read only
role.
Usage
Add the JitPack repository to your build file:
allprojects {
repositories {
...
maven {
url "https://jitpack.io"
}
}
}
Add the dependency to your application module:
dependencies {
compile 'com.github.sugoi-wada:appversionchecker:0.1.3'
}
You can usually call the method like:
PlayStore.checkForUpdates(context, jsonAssetsFileName);
If you use alpha/beta release:
PlayStore.checkForUpdates(context, jsonAssetsFileName, PlayStore.ReleaseType.BETA);
PlayStore.checkForUpdates(context, jsonAssetsFileName, PlayStore.ReleaseType.ALPHA);
License
Copyright (c) 2016 sugoi_wada.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.