GithubHelp home page GithubHelp logo

javiersantos / appupdater Goto Github PK

View Code? Open in Web Editor NEW
2.0K 70.0 410.0 3.61 MB

A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.

License: Apache License 2.0

Java 100.00%
snackbar dialog google-play changelog updater android-library

appupdater's People

Contributors

androidzhai avatar dekan avatar dhebbeker avatar dvdandroid avatar edgarjan avatar himphen avatar issotina avatar javiersantos avatar joen93 avatar johanvs avatar linakis avatar neoklosch avatar nyancrimew avatar pedrofsn avatar pengrad avatar pylersm avatar quadtriangle avatar sethgnavo avatar tdtran avatar thubalek avatar vicktor avatar zaldroc avatar zheil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appupdater's Issues

How does it work?

Sorry, but I did not see any information about how does it get the latest version number?
Lately I want to add the Update function in my app, so a more specific document will be appreciated.

Progress dialog

Showing a progress dialog (indeterminate) when checking for update would be nice.

Unable to resolve host "sit30.ru": No address associated with hostname

Exception java.lang.RuntimeException: An error occurred while executing doInBackground()
android.os.AsyncTask$3.done (AsyncTask.java:309)
java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:354)
java.util.concurrent.FutureTask.setException (FutureTask.java:223)
java.util.concurrent.FutureTask.run (FutureTask.java:242)
android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:234)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
java.lang.Thread.run (Thread.java:818)
arrow_drop_down
Caused by java.lang.RuntimeException: java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "sit30.ru": No address associated with hostname
com.github.javiersantos.appupdater.RssParser.parse (RssParser.java:33)
com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionXml (UtilsLibrary.java:201)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground (UtilsAsync.java:57)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground (UtilsAsync.java:13)
android.os.AsyncTask$2.call (AsyncTask.java:295)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:234)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
java.lang.Thread.run (Thread.java:818)
arrow_drop_down
Caused by java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "sit30.ru": No address associated with hostname
com.github.javiersantos.appupdater.RssParser.getInputStream (RssParser.java:41)
com.github.javiersantos.appupdater.RssParser.parse (RssParser.java:30)
com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionXml (UtilsLibrary.java:201)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground (UtilsAsync.java:57)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground (UtilsAsync.java:13)
android.os.AsyncTask$2.call (AsyncTask.java:295)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:234)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
java.lang.Thread.run (Thread.java:818)

SnackBar/Notification custom texts?

1.2 version now supports custom texts for Dialog? What about SnackBar and Notification? Would be really nice to have those also customisable.

dependencies

I tried to compile the provided link for the library so many times, but it did not work. Finally I imported the files and realised that the library depends on

compile 'com.android.support:design:22.2.0' for snackbar, and
compile 'com.squareup.okhttp3:okhttp:3.4.1' for okhttp3

adding this plugin extends my codebase in:

  • com.android.support:design:22.2.0 (14977 methods and 218kb)
  • com.github.javiersantos:AppUpdater:2.4 (23993 methods and 71lb)
  • com.squareup.okhttp3:okhttp:3.2.0 (2750 methods and 336kb)

http://www.methodscount.com/

too expensive is not it? Can you please add these 2 dependencies in the main documentation for other people? Thanks

Missing resource?

When building and trying to include the 1.2 version I'm getting the following error:

Error:(3, 5) No resource found that matches the given name (at 'android:actionModeCloseDrawable' with value '@drawable/abc_ic_ab_back_mtrl_am_alpha').

Thoughts?

UtilsLibrary is 'older version' in 2.2?

Hi:

I find UtilsLibrary.getLatestAppVersionHttp() always get null releaseNotes in com.github.javiersantos:AppUpdater:2.2 like this:

return new Update(version, (String)null, getUpdateURL(context, updateFrom, gitHub));

This function in branch master is like this:

final String version = getVersion(updateFrom, isAvailable, source);
final String recentChanges = getRecentChanges(updateFrom, isAvailable, source);
final URL updateUrl = getUpdateURL(context, updateFrom, gitHub);

return new Update(version, recentChanges, updateUrl);

Is there something wrong?

MaterialDialog Exception

On some low android version, like 4.2.2, occurred 'DialogException'.
Log:

com.afollestad.materialdialogs.MaterialDialog$DialogException
Bad window token, you cannot show a dialog before an Activity is created or after it's hidden.
com.afollestad.materialdialogs.MaterialDialog.show(MaterialDialog.java:1352)
com.afollestad.materialdialogs.MaterialDialog$Builder.show(MaterialDialog.java:1341)
com.github.javiersantos.appupdater.UtilsDisplay.showUpdateAvailableDialog(UtilsDisplay.java:23)
com.github.javiersantos.appupdater.AppUpdater$1.onSuccess(AppUpdater.java:230)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute(UtilsAsync.java:67)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute(UtilsAsync.java:13)
android.os.AsyncTask.finish(AsyncTask.java:631)
android.os.AsyncTask.access$600(AsyncTask.java:177)
android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
android.os.Handler.dispatchMessage(Handler.java:107)
android.os.Looper.loop(Looper.java:194)
android.app.ActivityThread.main(ActivityThread.java:5418)

Staged rollout on Google Play

Is there any issue with staged rollout and AppUpdater? What if the user is not part of the staged group, but the AppUpdater is. Do you see any issue?

app crash when find xml url backend service is closed.

Caused by: java.lang.RuntimeException: java.net.ConnectException: failed to connect to /192.168.0.254 (port 8080): connect failed: ECONNREFUSED (Connection refused)
at com.github.javiersantos.appupdater.RssParser.getInputStream(RssParser.java:58)
at com.github.javiersantos.appupdater.RssParser.parse(RssParser.java:32)
at com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionXml(UtilsLibrary.java:243)
at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:57)
at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:13)

Possiblity to use versionCode as well?

Greetings and thanks for the great lib.
Sometimes developers (me for example) publish a new build of the application without changing the versionName and only increase the versionCode.
Is that possible to specify versionCode in the XML?
Also I was wondering why you doesn't use the more efficient and common JSON instead of XML?

Activity has leaked window...?

Hi,
I would like to thank you first for the good library,
and I am wondering if you can provide a function to cancel or hide he dialog if it's been shown!
becuse I am getting "Activity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView..." if I wanted to launch another activity and the dialog is being shown.

Thanks in advance.

Fatal error if activity closes while it's connecting

The following is what I've observed in Fabric. It seems to happen mostly when the user closes the activity (that launched the async check).

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=8192; regionStart=0; regionLength=-1
       at java.util.Arrays.checkOffsetAndCount(Arrays.java:1719)
       at libcore.io.IoBridge.write(IoBridge.java:491)
       at java.io.FileOutputStream.write(FileOutputStream.java:186)
       at java.util.MarsUtils.write(MarsUtils.java:33)
       at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:704)
       at okio.Okio$2.read(SourceFile:138)
       at okio.AsyncTimeout$2.read(SourceFile:236)
       at okio.RealBufferedSource.request(SourceFile:66)
       at okio.RealBufferedSource.require(SourceFile:59)
       at okhttp3.internal.http2.Http2Reader.nextFrame(SourceFile:88)
       at okhttp3.internal.http2.Http2Connection$ReaderRunnable.execute(SourceFile:568)
       at okhttp3.internal.NamedRunnable.run(SourceFile:32)
       at java.lang.Thread.run(Thread.java:818)

Version Number failed to Parse if contains Non-digits characters

com.github.javiersantos.appupdater.objects.Version

The version object is using String of the project versionName, which could be anything including alphabet or symbols.

Version@compareTo(Version)

int thisPart = i < thisParts.length ? Integer.parseInt(thisParts[i]) : 0;

digit filter like in replaceAll could be added (ex.replaceAll("[^0-9?!\\.]",""))

Example README.md contains a typo.

AppUpdaterUtils appUpdaterUtils = new AppUpdaterUtils(this)
    //.setUpdateFrom(UpdateFrom.AMAZON)
    //.setUpdateFrom(UpdateFrom.GITHUB)
    //.setGitHubUserAndRepo("javiersantos", "AppUpdater")
    //...
    .withListener(new AppUpdaterUtils.UpdateListener() {
        @Override
        public void onSuccess(Update update, Boolean isUpdateAvailable) {
            Log.d("AppUpdater", update.getLatestVersion() + ", " + update.getUrlToDownload() + ", " + Boolean.toString(isUpdateAvailable));
        }

        @Override
        public void onFailed(AppUpdaterError error) {
            Log.d("AppUpdater", "Something went wrong");
        }}); //>>Expecting brace
appUpdaterUtils.start();

Probleme app crash

Hello

I have already posted a message, the problem to was.

But yesterday for no reason the problem came back.

I tried to look for a possible error but nothing does because the log does not show me anything (no line is registered).

I remove this line compile 'com.github.javiersantos: AppUpdater: 2.5.1' of my build.gradle and there the application works, but as soon as I rewrite this line compile' com.github.javiersantos: AppUpdater : 2.5.1' the application this farm immediately

Twice this happens to me that's why I'm really lost.

Please help me

App Crash

Hi, my application stops as soon as they are open while I have only added the library to my project, I do not even write the lines of codes.

Support for custom stores

Good evening @javiersantos, thanks for publishing your great AppUpdater on GitHub! Do you think you could add support for custom stores? To be more specific, I would like to see support for checking for updates from F-Droid and Aptoide. But since F-Droid builds apps from source when the codebase changes on GitHub or other places, I am not sure your AppUpdater can detect the correct way where to update from. Example: A user installs our app AIMSICD from GitHub releases and then your library notices that an update is available on Aptoide (published by ourselves) and F-Droid (automatically generated from source). How would the AppUpdater know which correct store to update our app from?

Not Configured

Cannot retrieve latest version. Is it configured properly?

RssParser crashed when there is I/O error

I'm getting SSL Handshake exception on some devices. I think that XML parser should be more robust and not crash whole app when there is I/O error. I'll submit PR with bugfix later

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0x558f26a0c0: I/O error during system call, Connection reset by peer at com.github.javiersantos.appupdater.RssParser.getInputStream(RssParser.java:63) at com.github.javiersantos.appupdater.RssParser.parse(RssParser.java:35) at com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionXml(UtilsLibrary.java:247) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:57) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:13) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0x558f26a0c0: I/O error during system call, Connection reset by peer at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(NativeCrypto.java) at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302) at com.android.okhttp.Connection.upgradeToTls(Connection.java:197) at com.android.okhttp.Connection.connect(Connection.java:151) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211) at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190) at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) at com.github.javiersantos.appupdater.RssParser.getInputStream(RssParser.java:58) at com.github.javiersantos.appupdater.RssParser.parse(RssParser.java:35) at com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionXml(UtilsLibrary.java:247) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:57) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:13) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

Is there a debug mode?

Hi, to test the library in devel mode, is there a debug mode that always displays the update even when there's no update?

Also it'd be good to be able to change the notification icon, some ic_launcher's don't render correctly in notification bar

No update not showing

hi usually when a user is up to date it would show a dialog and now it isn't showing ?

RuntimeException in UtilsLibrary class

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:848) Caused by java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionHttp(UtilsLibrary.java:171) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:59) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:13) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:848)

Check for updates in settings fragment

Hi whenever i try to implement Appupdater in the settings activity either as a menu option or a preference the app crashes is there anything i can do to fix it ?

Fatal Error seeing in Fabric

Seeing the following issue, possibly something going out of scope? At least need protection from the error when Activity/Context is invalid?

Seeing in 2.5.1 as well as earlier versions.

Fatal Exception: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@178ef1bd is not valid; is your activity running?
       at android.view.ViewRootImpl.setView(ViewRootImpl.java:579)
       at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
       at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
       at android.app.Dialog.show(Dialog.java:298)
       at com.github.javiersantos.appupdater.AppUpdater$1.onSuccess(AppUpdater.java:302)
       at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute(UtilsAsync.java:74)
       at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute(UtilsAsync.java:13)
       at android.os.AsyncTask.finish(AsyncTask.java:636)
       at android.os.AsyncTask.access$500(AsyncTask.java:177)
       at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5333)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:940)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735)

BadTokenException crash

Hello,
I received many reports for the following crash.
When the update check finishes, if the bound context is not running anymore the app will crash and, being asynchronous, we can't catch it.
Unfortunately I don't know any clean countermeasure for this problem without modifying any other part of this library, so in my local copy I've used a big try-catch inside the onSuccess method.

Thank you very much!

Fatal Exception: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@46a0ca5 is not valid; is your activity running?
       at android.view.ViewRootImpl.setView(ViewRootImpl.java:687)
       at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:288)
       at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
       at android.app.Dialog.show(Dialog.java:312)
       at com.github.javiersantos.appupdater.AppUpdater$1.onSuccess(AppUpdater.java:309)
       at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute(UtilsAsync.java:82)

LibraryListener object not null in PreExecute but null in PostExecute - listener not called

LibraryListener listener = (LibraryListener)this.listenerRef.get()

The above line in the LatestAppVersion::PreExecute method works fine and returns the LibraryListener created in AppUpdater::start but returns null in LatestAppVersion::PostExecute

Running on 2nd gen Moto E with Android 6.0

I am calling AppUpdater in my main activity's onCreate with new AppUpdater(this).start();

error LatestAppVersion.onPostExecute

Good some of my users are giving the following error in devices with Android OS: 4.4.2.
I attach the trace

android.view.ViewRootImpl.setView (ViewRootImpl.java:727)
android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:278)
android.view.WindowManagerImpl.addView (WindowManagerImpl.java:69)
android.app.Dialog.show (Dialog.java:288)
com.github.javiersantos.appupdater.AppUpdater$1.onSuccess (AppUpdater.java:302)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute (UtilsAsync.java:74)
com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.onPostExecute (UtilsAsync.java:13)
android.os.AsyncTask.finish (AsyncTask.java:632)
android.os.AsyncTask.access$600 (AsyncTask.java:177)
android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:645)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:157)
android.app.ActivityThread.main (ActivityThread.java:5293)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1265)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1081)
dalvik.system.NativeStart.main (NativeStart.java)

Snackbar update strings

When prompting for update via a snackbar, the version name that is shown is the current version instead of the latest version.
Uploading Screenshot_2016-02-25-10-14-03.png…

On the image, the current version is 0.1

Does this library work with staged rollouts?

Thanks for creating a very useful library. Does it work properly with staged rollouts? I don't want to show a dialog/notification if a user is not a part of the staged rollout group.

Custom texts in library?

Hi,

I'm wondering if besides the appupdater_btn_disable and appupdater_btn_update there's a way to customize the message displayed to the user as I want to show it in the user's language.

Thanks

UpdateListener methods not called

Hi!
We are using this library for quite a time and all was good until recently. We have two separate flavours of our app, one which is released to the Play Store and one which used for development purposes. Both apps check for updates using this lib, but obviously the development flavour never has updates (as it is not published to the Play Store). We do not use the built-in dialogs of this lib, but use an UpdateListener and do our own logic, like this:

appUpdaterUtils
	.setUpdateFrom(UpdateFrom.GOOGLE_PLAY)
	.withListener(new AppUpdaterUtils.UpdateListener() {
		@Override
		public void onSuccess(Update update, Boolean isUpdateAvailable) {
			// OUR OWN LOGIC
		}

		@Override
		public void onFailed(AppUpdaterError error) {
			// OUR OWN LOGIC
		}
	});
appUpdaterUtils.start();

Until version 2.5, the UpdateListener's onSuccess method was always called on our development flavour with the isUpdateAvailable value as false. Since 2.5.1, sometimes none of the methods of the UpdateListener are called, and sometimes the same happens as before. It is not deterministic and I could not find anything that triggers the wrong behavior yet.

Could you look into this issue? We will use version 2.5 until it is resolved.

java.net.SocketTimeoutException

It seems that the timeout causes an error because of which my app closes.

Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: failed to connect to sit30.ru/212.47.233.170 (port 80) after 90000ms at com.github.javiersantos.appupdater.RssParser.getInputStream(RssParser.java:63) at com.github.javiersantos.appupdater.RssParser.parse(RssParser.java:35) at com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionXml(UtilsLibrary.java:247) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:57) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:13) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) ... 4 more Caused by: java.net.SocketTimeoutException: failed to connect to sit30.ru/212.47.233.170 (port 80) after 90000ms at libcore.io.IoBridge.connectErrno(IoBridge.java:189) at libcore.io.IoBridge.connect(IoBridge.java:127) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:461) at java.net.Socket.connect(Socket.java:918) at com.android.okhttp.internal.Platform.connectSocket(Platform.java:174) at com.android.okhttp.Connection.connect(Connection.java:152) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:282) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:216) at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:391) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:341) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:199) at com.github.javiersantos.appupdater.RssParser.getInputStream(RssParser.java:58)

When Google Play is not a default App Store in Android

Having an issue, if user is using some "china-made" android phone, and Google Play is not the default App Store in the phone.

It will be great, if AppUpdater allow user to pass the apps URL into the "AppUpdaterUtils"

Thanks.

Encountered a Leak

I used StrictMode while testing my app and I received an error. I think HTTP connection was not closed.

Error Log:

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 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:288) at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103) at com.android.okhttp.Connection.connect(Connection.java:143) at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185) at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128) at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java) at com.github.javiersantos.appupdater.UtilsLibrary.getLatestAppVersionHttp(UtilsLibrary.java:122) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:59) at com.github.javiersantos.appupdater.UtilsAsync$LatestAppVersion.doInBackground(UtilsAsync.java:13) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.