You can manage your application's version update or get your market information more simply.
This Library used Jsoup.
repositories {
mavenCentral() // or jcenter() works as well
}
dependencies {
compile 'com.skydoves.syncmarket:syncmarket:1.0.3'
}<dependency>
<groupId>com.skydoves.syncmarket</groupId>
<artifactId>syncmarket</artifactId>
<version>1.0.3</version>
</dependency>Need below permissions in AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>Next you have to call initialize method as below as follows
SyncMarket.Initialize(this);and then use like this
SyncMarket.getMarketVersion() That's it!
If you call "get...()" Method, then return your published app's information from Google Play Store.
From : https://play.google.com/store/apps/details?id= + (packageName)
If your application is not published yet or not connected internet, then return null.
SyncMarket.getMarketVersion(); // get the last published version from Google Play StoreSyncMarket.isVersionEqual(); // check is this application version equal the last published version?SyncMarket.getMarketDownloads(); // get downloads range from Google Play StoreSyncMarket.getMarketRecentChange(); // get recent change list from Google Play StoreSyncMarket.getMarketRecentChangeArray(); // get the last published date from Google Play Store as string arraySyncMarket.getMarketOperatingSystems(); // get require minimum device api level from Google Play StoreSyncMarket.getMarketPublishedDate(); // get the last published date from Google Play StoreSyncMarket.getMarketUrl(); // get url application's urlSyncMarket.gotoMarket(); // intent your application's Google Play Store PageSyncMarket.isNetworkAvailable(); // check is network is available? -keep public class org.jsoup.** {
public *;
}Copyright 2017 skydoves
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.