aritraroy / rxmagneto Goto Github PK
View Code? Open in Web Editor NEWA fast, simple and powerful Play Store information fetcher for Android.
License: Apache License 2.0
A fast, simple and powerful Play Store information fetcher for Android.
License: Apache License 2.0
Hello there,
First of all I quite like the library, while doing some testing I have found that isUpgradeAvailable is returning true even though the version name of the installed app and the one on the playstore is the same.
To be extra sure I even checked the updates page in google play store(Open playstore -> Side menu -> My apps & games) and confirmed that there were no updates available for that app.
After through all the apps with package manager the method returned true for all of them for some reason.
Thanks
I found my problem, it actually came from Proguard. I suggest you add these rules in your readme, which are necessary.
# rxjava
-dontwarn sun.misc.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
}
-dontnote rx.internal.util.PlatformDependent
##############################
-keep class org.jsoup.nodes.** {*;}
I had a user who had blocked google services using the LuckyPatcher application and when he tries to access the changelog application crash. You may be able to add to your library a check if google services are allowed.
Thanks for your library which is really useful ;)
Here is my error stack if it can help you
`Exception java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
rx.internal.schedulers.ScheduledAction.run (ScheduledAction.java:59)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:422)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:152)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:265)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
java.lang.Thread.run (Thread.java:841)
arrow_drop_down
Caused by java.lang.ExceptionInInitializerError:
org.jsoup.nodes.Document$OutputSettings. (Document.java:372)
org.jsoup.nodes.Document. (Document.java:19)
org.jsoup.parser.TreeBuilder.initialiseParse (TreeBuilder.java:32)
org.jsoup.parser.TreeBuilder.parse (TreeBuilder.java:42)
org.jsoup.parser.HtmlTreeBuilder.parse (HtmlTreeBuilder.java:56)
org.jsoup.parser.Parser.parseInput (Parser.java:32)
org.jsoup.helper.DataUtil.parseByteData (DataUtil.java:135)
org.jsoup.helper.HttpConnection$Response.parse (HttpConnection.java:747)
org.jsoup.helper.HttpConnection.get (HttpConnection.java:250)
com.aritraroy.rxmagneto.RxMagnetoInternal$5.call (RxMagnetoInternal.java:197)
com.aritraroy.rxmagneto.RxMagnetoInternal$5.call (RxMagnetoInternal.java:188)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:72)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:32)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:248)
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:148)
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77)
rx.internal.operators.OnSubscribeCreate$LatestEmitter.drain (OnSubscribeCreate.java:492)
rx.internal.operators.OnSubscribeCreate$LatestEmitter.onNext (OnSubscribeCreate.java:425)
com.aritraroy.rxmagneto.RxMagnetoInternal$1.call (RxMagnetoInternal.java:55)
com.aritraroy.rxmagneto.RxMagnetoInternal$1.call (RxMagnetoInternal.java:42)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:72)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:32)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call (OperatorSubscribeOn.java:100)
rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call (CachedThreadScheduler.java:230)
rx.internal.schedulers.ScheduledAction.run (ScheduledAction.java:55)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:422)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:152)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:265)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
java.lang.Thread.run (Thread.java:841)
arrow_drop_down
Caused by java.lang.IllegalStateException: Could not read resource entities-xhtml.properties. Make sure you copy resources for org.a.b.i
org.jsoup.nodes.Entities.load (Entities.java:301)
org.jsoup.nodes.Entities.access$000 (Entities.java:25)
org.jsoup.nodes.Entities$EscapeMode. (Entities.java:53)
org.jsoup.nodes.Entities$EscapeMode. (Entities.java:34)
org.jsoup.nodes.Document$OutputSettings. (Document.java:372)
org.jsoup.nodes.Document. (Document.java:19)
org.jsoup.parser.TreeBuilder.initialiseParse (TreeBuilder.java:32)
org.jsoup.parser.TreeBuilder.parse (TreeBuilder.java:42)
org.jsoup.parser.HtmlTreeBuilder.parse (HtmlTreeBuilder.java:56)
org.jsoup.parser.Parser.parseInput (Parser.java:32)
org.jsoup.helper.DataUtil.parseByteData (DataUtil.java:135)
org.jsoup.helper.HttpConnection$Response.parse (HttpConnection.java:747)
org.jsoup.helper.HttpConnection.get (HttpConnection.java:250)
com.aritraroy.rxmagneto.RxMagnetoInternal$5.call (RxMagnetoInternal.java:197)
com.aritraroy.rxmagneto.RxMagnetoInternal$5.call (RxMagnetoInternal.java:188)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:72)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:32)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:248)
rx.internal.operators.OperatorMerge$MergeSubscriber.onNext (OperatorMerge.java:148)
rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext (OnSubscribeMap.java:77)
rx.internal.operators.OnSubscribeCreate$LatestEmitter.drain (OnSubscribeCreate.java:492)
rx.internal.operators.OnSubscribeCreate$LatestEmitter.onNext (OnSubscribeCreate.java:425)
com.aritraroy.rxmagneto.RxMagnetoInternal$1.call (RxMagnetoInternal.java:55)
com.aritraroy.rxmagneto.RxMagnetoInternal$1.call (RxMagnetoInternal.java:42)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:72)
rx.internal.operators.OnSubscribeCreate.call (OnSubscribeCreate.java:32)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:48)
rx.internal.operators.OnSubscribeMap.call (OnSubscribeMap.java:33)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:48)
rx.internal.operators.OnSubscribeLift.call (OnSubscribeLift.java:30)
rx.Observable.unsafeSubscribe (Observable.java:10346)
rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call (OperatorSubscribeOn.java:100)
rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call (CachedThreadScheduler.java:230)
rx.internal.schedulers.ScheduledAction.run (ScheduledAction.java:55)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:422)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (ScheduledThreadPoolExecutor.java:152)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:265)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
java.lang.Thread.run (Thread.java:841)`
Hello Developer,
Your code is work perfect but play store recently change in code like "div[itemprop" & "softwareversion" tag is remove or change so now code stop working.
Thanks
When strict mode is enabled, I get this stacktrace:
E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:103)
at java.net.Socket.createImpl(Socket.java:470)
at java.net.Socket.getImpl(Socket.java:536)
at java.net.Socket.setSoTimeout(Socket.java:1127)
at com.android.okhttp.Connection.connectSocket(Connection.java:195)
at com.android.okhttp.Connection.connect(Connection.java:172)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:367)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:126)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java)
at com.aritraroy.rxmagneto.RxMagnetoInternal.lambda$isPackageUrlValid$0(RxMagnetoInternal.java:73)
at com.aritraroy.rxmagneto.RxMagnetoInternal$$Lambda$1.subscribe(Unknown Source)
at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
at io.reactivex.Observable.subscribe(Observable.java:10842)
at io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual(ObservableFlatMap.java:55)
at io.reactivex.Observable.subscribe(Observable.java:10842)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
I think it's due, to httpURLConnection.getResponseCode()
which does not properly close input stream, see: https://stackoverflow.com/questions/15789789/android-strictmode-throwable-explicit-termination-method-end-not-called
Also HttpURLConnection is never disconnected. Replacing usage of HttpURLConnection by Jsoup fix the probleme. PR is comming.
Hi,
I wanted to test your library (which looks awesome!) But I have a problem understanding your code. I do not use lambda expressions and I can not "translate" this, especially the "s->" and "trowable->". Can you help me ?
Observable<String> changelogObservable = rxMagneto.grabPlayStoreRecentChangelog(packageName);
changelogObservable.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(s -> {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
}
showResult(mFeatureModelList.get(FeaturesConfig.FEATURE_RECENT_CHANGELOG).getTitle(), s);
}, throwable -> {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
}
showResult(getResources().getString(R.string.label_error), throwable.getMessage());
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.