A fast, light-weight and powerful Play Store information fetcher for Android.
This library allows you to fetch various live information from Play Store of your app or any other app of your choice. With just a few lines of code, you can get access to a lot of useful app data fetched fresh from the Play Store.
It has been named after the famous anti-villian from X-Men. This library has been completely written using RxJava giving you powerful controls to make the most use of it.
This library is available in jCenter which is the default Maven repository used in Android Studio.
dependencies {
// other dependencies here
compile 'com.andrognito.rxmagneto:rxmagneto:1.0.0'
}
<dependency>
<groupId>com.andrognito.rxmagneto</groupId>
<artifactId>rxmagneto</artifactId>
<version>1.0.0</version>
<type>pom</type>
</dependency>
There are several use cases of this library. Here are some common examples for you to get started, but you can always be creative and make the most use of it.
This is a common problem for many developers wanting to check if their users are using the latest version of the app available on Play Store or not. With RxMagneto, you can get it done with just a single line of code and zero hassle.
You might want to show your users the latest changelog when they update the app. RxMagneto can help you fetch the most recent changelog directly from Play Store with just one line of code.
Many developers prompt their users to rate the app after a certain period of time. You can also show your current rating and ratings count directly from Play Store to encourage these users to rate your app even more.
Once you have downloaded the library in your project, setting up RxMagneto is super-easy.
RxMagneto rxMagneto = RxMagneto.getInstance();
rxMagneto.initialize(this);
The initialize method takes a Context object. It can either be an Application context or Activity context.
Here is a quick example for you to get started right away in less than a minute.
RxMagneto rxMagneto = RxMagneto.getInstance();
rxMagneto.initialize(this);
Observable<String> observable = rxMagneto.grabVersion(packageName);
observable.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(s -> {
Log.d("RxMagneto", "Version: " + s);
}, throwable -> {
Log.d("RxMagneto", "Error");
});
Here is a list of all the featues offered by RxMagneto. I will be actively taking more feature requests and expand the library over time.
Gets the Play Store URL of the specified package. You can make this call in the main thread of the application.
Observable<String> urlObservable = rxMagneto.grabUrl(packageName);
Gets the verified Play Store URL of the specified package. You can NOT make this call in the main thread of the application.
Observable<String> urlObservable = rxMagneto.grabVerifiedUrl(packageName);
Gets the latest version of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> versionObservable = rxMagneto.grabVersion(packageName);
Check if an update is available for the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<Boolean> updateAvailableObservable = rxMagneto.isUpgradeAvailable(packageName);
Gets the no. of downloads of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> downloadsObservable = rxMagneto.grabDownloads(packageName);
Gets the last published date of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> publishedDateObservable = rxMagneto.grabPublishedDate(packageName);
Gets the OS requirements of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> osRequirementsObservable = rxMagneto.grabOsRequirements(packageName);
Gets the content rating of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> contentRatingObservable = rxMagneto.grabContentRating(packageName);
Gets the app rating of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> appRatingObservable = rxMagneto.grabAppRating(packageName);
Gets the no. of app ratings of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> appRatingsCount = rxMagneto.grabAppRatingsCount(packageName);
Gets the recent changelog (as array) of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<ArrayList<String>> changelogObservable = rxMagneto.grabPlayStoreRecentChangelogArray(packageName);
Gets the recent changelog (as string) of the specified package from Play Store. You can NOT make this call in the main thread of the application.
Observable<String> changelogObservable = rxMagneto.grabPlayStoreRecentChangelog(packageName);
This library is quite powerful and offers a lot of features. But I will love to have more feature requests from you to expand it further. If you find a bug or would like to improve any aspect of it, feel free to contribute with pull requests.
Android & Backend Developer. Blogger. Designer. Fitness Enthusiast.
Copyright 2017 aritraroy
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.