winsontan520 / Android-WVersionManager

[Deprecated] Library to check new update available in background by using own content
141 stars 57 forks source link

How to show A dialog if the "Version Is Up to Date" #11

Closed QInfro closed 7 years ago

QInfro commented 7 years ago

everything is fine, and everything is working perfectly for me, but how can we put the dialog if the version is uptodate, currently it is not displaying any dialog if the version is uptodate. so can u say how can i set that dialog?

"Your Version Is UpToDate".

winsontan520 commented 7 years ago

Currently it will only show if any update available. For your case, you might need handle yourself in setOnReceiveListener eg: versionManager.setOnReceiveListener(new OnReceiveListener() { @Override public boolean onReceive(int status, String result) { // compare current app version code with result then show dialog accordingly here

return false; // return true if you want to use library's default logic & dialog } });

On Thu, Feb 9, 2017 at 8:14 PM, GOPALAKRISHNAREDDY <notifications@github.com

wrote:

everything is fine, and everything is working perfectly for me, but how can we put the dialog if the version is uptodate, currently it is not displaying any dialog if the version is uptodate. so can u say how can i set that dialog?

"Your Version Is UpToDate".

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/winsontan520/Android-WVersionManager/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6DJNuPAmNVpJ6m7cwRr_uyf3Y_27WGks5rawMngaJpZM4L8DZq .

winsontan520 commented 7 years ago

versionManager.setOnReceiveListener(new OnReceiveListener() { @Override public boolean onReceive(int status, String result) { if(isLatestVersion){ showYourOwnDialog(); return false; }else{ // show default dialog as usual return true; } );

On Tue, Mar 21, 2017 at 9:14 AM, Winson Tan winsontan520@gmail.com wrote:

Currently it will only show if any update available. For your case, you might need handle yourself in setOnReceiveListener eg: versionManager.setOnReceiveListener(new OnReceiveListener() { @Override public boolean onReceive(int status, String result) { // compare current app version code with result then show dialog accordingly here

return false; // return true if you want to use library's default logic & dialog } });

On Thu, Feb 9, 2017 at 8:14 PM, GOPALAKRISHNAREDDY < notifications@github.com> wrote:

everything is fine, and everything is working perfectly for me, but how can we put the dialog if the version is uptodate, currently it is not displaying any dialog if the version is uptodate. so can u say how can i set that dialog?

"Your Version Is UpToDate".

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/winsontan520/Android-WVersionManager/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6DJNuPAmNVpJ6m7cwRr_uyf3Y_27WGks5rawMngaJpZM4L8DZq .

QInfro commented 7 years ago

I have already fixed that, now it is showing dialog for uptodate version, Thanks for u r code