├── settings.gradle ├── raw ├── logo_250.png └── github_screenshot.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── app ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ ├── button_background.xml │ │ │ │ └── button_selector.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── layout_recycler_item.xml │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── aritraroy │ │ │ └── rxmagnetodemo │ │ │ ├── FeaturesConfig.java │ │ │ ├── domain │ │ │ └── FeatureModel.java │ │ │ ├── FeaturesRecyclerAdapter.java │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── aritraroy │ │ │ └── rxmagnetodemo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── aritraroy │ │ └── rxmagnetodemo │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── rxmagneto ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── aritraroy │ │ │ │ └── rxmagneto │ │ │ │ ├── util │ │ │ │ ├── Constants.java │ │ │ │ └── Connectivity.java │ │ │ │ ├── exceptions │ │ │ │ ├── NetworkNotAvailableException.java │ │ │ │ ├── AppVersionNotFoundException.java │ │ │ │ └── RxMagnetoException.java │ │ │ │ ├── core │ │ │ │ ├── RxMagnetoTags.java │ │ │ │ ├── RxMagnetoErrorCodeMap.java │ │ │ │ ├── RxMagnetoInternal.java │ │ │ │ └── RxMagneto.java │ │ │ │ └── domain │ │ │ │ └── PlayPackageInfo.java │ │ ├── AndroidManifest.xml │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── aritraroy │ │ │ └── rxmagneto │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── aritraroy │ │ └── rxmagneto │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── gradle.properties ├── .gitignore ├── gradlew.bat ├── gradlew ├── README.md └── LICENSE /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':rxmagneto' 2 | -------------------------------------------------------------------------------- /raw/logo_250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/raw/logo_250.png -------------------------------------------------------------------------------- /raw/github_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/raw/github_screenshot.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aritraroy/RxMagneto/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/util/Constants.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.util; 2 | 3 | public class Constants { 4 | public static final String APP_VERSION_VARIES_WITH_DEVICE = "Varies with device"; 5 | } 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Aug 12 22:08:37 IST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #F06292 7 | #FFF 8 | #303030 9 | 10 | -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/exceptions/NetworkNotAvailableException.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.exceptions; 2 | 3 | /** 4 | * Exception thrown when the network connection is not available for the device 5 | */ 6 | public class NetworkNotAvailableException extends Exception { 7 | public NetworkNotAvailableException(String message) { 8 | super(message); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /rxmagneto/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/test/java/com/aritraroy/rxmagnetodemo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagnetodemo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /rxmagneto/src/test/java/com/aritraroy/rxmagneto/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/exceptions/AppVersionNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.exceptions; 2 | 3 | /** 4 | * Exception thrown when a proper app version is not available for the specified package 5 | * on Play Store. This typically happens when there is no version mentioned in Play Store page 6 | * itself and we get a message like "Varies with device". 7 | */ 8 | public class AppVersionNotFoundException extends Exception { 9 | public AppVersionNotFoundException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/exceptions/RxMagnetoException.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.exceptions; 2 | 3 | /** 4 | * Generic exception thrown by RxMagneto containing an {@code errorCode} specifying the exact 5 | * error and a message describing it in detail 6 | */ 7 | public class RxMagnetoException extends Exception { 8 | 9 | private final int errorCode; 10 | 11 | public RxMagnetoException(int errorCode, String message) { 12 | super(message); 13 | this.errorCode = errorCode; 14 | } 15 | 16 | public int getErrorCode() { 17 | return errorCode; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/core/RxMagnetoTags.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.core; 2 | 3 | public class RxMagnetoTags { 4 | public static final String TAG_PLAY_STORE_VERSION = "softwareVersion"; 5 | public static final String TAG_PLAY_STORE_DOWNLOADS = "numDownloads"; 6 | public static final String TAG_PLAY_STORE_LAST_PUBLISHED_DATE = "datePublished"; 7 | public static final String TAG_PLAY_STORE_OS_REQUIREMENTS = "operatingSystems"; 8 | public static final String TAG_PLAY_STORE_CONTENT_RATING = "contentRating"; 9 | public static final String TAG_PLAY_STORE_APP_RATING = "score"; 10 | public static final String TAG_PLAY_STORE_APP_RATING_COUNT = "reviews-num"; 11 | } 12 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/aritraroy/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/aritraroy/rxmagnetodemo/FeaturesConfig.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagnetodemo; 2 | 3 | /** 4 | * Created by aritraroy on 19/02/17. 5 | */ 6 | 7 | public class FeaturesConfig { 8 | 9 | public static final int FEATURE_URL = 0; 10 | public static final int FEATURE_VERSION = 1; 11 | public static final int FEATURE_IS_UPDATE_AVAILABLE = 2; 12 | public static final int FEATURE_DOWNLOADS = 3; 13 | public static final int FEATURE_LAST_PUBLISHED_DATE = 4; 14 | public static final int FEATURE_OS_REQUIREMENTS = 5; 15 | public static final int FEATURE_CONTENT_RATING = 6; 16 | public static final int FEATURE_APP_RATING = 7; 17 | public static final int FEATURE_APP_RATINGS_COUNT = 8; 18 | public static final int FEATURE_RECENT_CHANGELOG = 9; 19 | } 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/core/RxMagnetoErrorCodeMap.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.core; 2 | 3 | /** 4 | * A map containing all error codes returned by RxMagneto 5 | */ 6 | public enum RxMagnetoErrorCodeMap { 7 | ERROR_GENERIC(100), 8 | ERROR_URL(101), 9 | ERROR_VERIFIED_ERROR(102), 10 | ERROR_VERSION(103), 11 | ERROR_UPDATE(104), 12 | ERROR_DOWNLOADS(105), 13 | ERROR_PUBLISHED_DATE(106), 14 | ERROR_OS_REQUIREMENTS(107), 15 | ERROR_CONTENT_RATING(108), 16 | ERROR_APP_RATING(109), 17 | ERROR_APP_RATING_COUNT(110), 18 | ERROR_CHANGELOG(111); 19 | 20 | private int errorCode; 21 | 22 | RxMagnetoErrorCodeMap(int errorCode) { 23 | this.errorCode = errorCode; 24 | } 25 | 26 | public int getErrorCode() { 27 | return errorCode; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Android ### 2 | # Built application files 3 | *.apk 4 | *.ap_ 5 | 6 | # Files for the ART/Dalvik VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # Generated files 13 | bin/ 14 | gen/ 15 | out/ 16 | 17 | # Gradle files 18 | .gradle/ 19 | build/ 20 | 21 | # Local configuration file (sdk path, etc) 22 | local.properties 23 | 24 | # Proguard folder generated by Eclipse 25 | proguard/ 26 | 27 | # Log Files 28 | *.log 29 | 30 | # Android Studio Navigation editor temp files 31 | .navigation/ 32 | 33 | # Android Studio captures folder 34 | captures/ 35 | 36 | # Intellij 37 | *.iml 38 | .idea/ 39 | 40 | # External native build folder generated in Android Studio 2.2 and later 41 | .externalNativeBuild 42 | 43 | # Freeline 44 | freeline.py 45 | freeline/ 46 | freeline_project_description.json 47 | 48 | ### Android Patch ### 49 | gen-external-apklibs 50 | 51 | # End of https://www.gitignore.io/api/android -------------------------------------------------------------------------------- /app/src/androidTest/java/com/aritraroy/rxmagnetodemo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagnetodemo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.aritraroy.rxmagnetodemo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/aritraroy/rxmagnetodemo/domain/FeatureModel.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagnetodemo.domain; 2 | 3 | /** 4 | * Created by aritraroy on 19/02/17. 5 | */ 6 | 7 | public class FeatureModel { 8 | 9 | private int id; 10 | private String title; 11 | 12 | public FeatureModel(int id, String title) { 13 | this.id = id; 14 | this.title = title; 15 | } 16 | 17 | public int getId() { 18 | return id; 19 | } 20 | 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | 25 | public String getTitle() { 26 | return title; 27 | } 28 | 29 | public void setTitle(String title) { 30 | this.title = title; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return "FeatureModel{" + 36 | "id=" + id + 37 | ", title='" + title + '\'' + 38 | '}'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /rxmagneto/src/androidTest/java/com/aritraroy/rxmagneto/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.aritraroy.rxmagneto.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_recycler_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RxMagnetoDemo 3 | Rx Magneto 4 | Grab Result 5 | Ok 6 | Error 7 | Enter package name 8 | Package name can not be empty 9 | Grabbing, please wait… 10 | com.codexapps.andrognito 11 | 12 | 13 | URL 14 | Version 15 | Is Update Available? 16 | Downloads 17 | Last Published Date 18 | OS Requirements 19 | Content Rating 20 | App Rating 21 | App Ratings Count 22 | Changelog 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'me.tatarka.retrolambda' 3 | 4 | android { 5 | compileSdkVersion 26 6 | buildToolsVersion "26.0.2" 7 | defaultConfig { 8 | applicationId "com.aritraroy.rxmagnetodemo" 9 | minSdkVersion 14 10 | targetSdkVersion 26 11 | versionCode 1 12 | versionName "1.0" 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | compileOptions { 22 | sourceCompatibility JavaVersion.VERSION_1_8 23 | targetCompatibility JavaVersion.VERSION_1_8 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(dir: 'libs', include: ['*.jar']) 29 | compile project(':rxmagneto') 30 | 31 | compile 'com.android.support:appcompat-v7:26.1.0' 32 | compile 'com.android.support:recyclerview-v7:26.1.0' 33 | compile 'com.android.support:design:26.1.0' 34 | 35 | compile 'io.reactivex.rxjava2:rxandroid:2.0.1' 36 | compile 'com.afollestad.material-dialogs:core:0.9.3.0' 37 | } -------------------------------------------------------------------------------- /rxmagneto/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/aritraroy/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -dontwarn sun.misc.** 19 | 20 | -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* { 21 | long producerIndex; 22 | long consumerIndex; 23 | } 24 | 25 | -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef { 26 | rx.internal.util.atomic.LinkedQueueNode producerNode; 27 | } 28 | 29 | -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef { 30 | rx.internal.util.atomic.LinkedQueueNode consumerNode; 31 | } 32 | 33 | -dontnote rx.internal.util.PlatformDependent 34 | -keep class org.jsoup.nodes.** {*;} -------------------------------------------------------------------------------- /rxmagneto/src/main/java/com/aritraroy/rxmagneto/util/Connectivity.java: -------------------------------------------------------------------------------- 1 | package com.aritraroy.rxmagneto.util; 2 | 3 | import android.content.Context; 4 | import android.net.ConnectivityManager; 5 | import android.net.NetworkInfo; 6 | import android.support.annotation.Nullable; 7 | 8 | /** 9 | * Utility class to check network connectivity of the device 10 | */ 11 | public class Connectivity { 12 | 13 | /** 14 | * Check if the device is connected to the network or not 15 | * 16 | * @param context The application context 17 | * @return The connectivity status of the device 18 | */ 19 | public static boolean isConnected(Context context) { 20 | if (context != null) { 21 | NetworkInfo info = getNetworkInfo(context); 22 | return info != null && info.isConnected(); 23 | } 24 | return false; 25 | } 26 | 27 | /** 28 | * Get the network information of the device 29 | * 30 | * @param context The application context 31 | * @return The {@link NetworkInfo} object 32 | */ 33 | @Nullable 34 | private static NetworkInfo getNetworkInfo(Context context) { 35 | if (context != null) { 36 | ConnectivityManager cm = (ConnectivityManager) context 37 | .getSystemService(Context.CONNECTIVITY_SERVICE); 38 | return cm.getActiveNetworkInfo(); 39 | } 40 | return null; 41 | } 42 | } -------------------------------------------------------------------------------- /rxmagneto/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RxMagneto 3 | Internet connection is not available. 4 | Package url is malformed. 5 | Failed to grab app changelog 6 | Failed to grab app rating count 7 | Failed to grab app rating 8 | Failed to grab content rating 9 | Failed to grab OS requirements 10 | Failed to grab published date 11 | Failed to grab downloads 12 | App version varies with device. 13 | Failed to grab package update 14 | %1$s not installed in your device 15 | Failed to grab package version 16 | Failed to grab verified url 17 | Failed to grab url. 18 | 19 | -------------------------------------------------------------------------------- /rxmagneto/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'me.tatarka.retrolambda' 3 | 4 | ext { 5 | bintrayRepo = 'maven' 6 | bintrayName = 'rxmagneto' 7 | 8 | publishedGroupId = 'com.andrognito.rxmagneto' 9 | libraryName = 'rxmagneto' 10 | artifact = 'rxmagneto' 11 | 12 | libraryDescription = 'A fast, simple and powerful Play Store information fetcher for Android' 13 | 14 | siteUrl = 'https://github.com/aritraroy/RxMagneto' 15 | gitUrl = 'https://github.com/aritraroy/RxMagneto.git' 16 | 17 | libraryVersion = '2.0.0' 18 | 19 | developerId = 'aritraroy' 20 | developerName = 'Aritra Roy' 21 | developerEmail = 'aritra.roy.in@gmail.com' 22 | 23 | licenseName = 'The Apache Software License, Version 2.0' 24 | licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' 25 | allLicenses = ["Apache-2.0"] 26 | } 27 | 28 | android { 29 | compileSdkVersion 26 30 | buildToolsVersion "26.0.2" 31 | 32 | defaultConfig { 33 | minSdkVersion 14 34 | targetSdkVersion 26 35 | versionCode 2 36 | versionName "2.0" 37 | } 38 | 39 | buildTypes { 40 | release { 41 | minifyEnabled false 42 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 43 | } 44 | } 45 | compileOptions { 46 | sourceCompatibility JavaVersion.VERSION_1_8 47 | targetCompatibility JavaVersion.VERSION_1_8 48 | } 49 | } 50 | 51 | repositories { 52 | mavenCentral() 53 | } 54 | 55 | dependencies { 56 | compile fileTree(dir: 'libs', include: ['*.jar']) 57 | 58 | compile 'com.android.support:support-annotations:26.1.0' 59 | compile 'io.reactivex.rxjava2:rxjava:2.1.4' 60 | compile 'org.jsoup:jsoup:1.10.2' 61 | 62 | testCompile 'junit:junit:4.12' 63 | } 64 | 65 | apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' 66 | apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 31 | 32 | 40 | 41 | 46 | 47 | 48 | 49 | 59 | 60 |