javiersantos / AppUpdater

A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.
Apache License 2.0
1.98k stars 412 forks source link

update dialog not showing. #173

Closed shakiz closed 4 years ago

shakiz commented 4 years ago

new AppUpdater(this) .showEvery(5) Following the above code i have created a method where i pass duration in int value but i was unable to start the update dialog if i pass duration which is larger than 0.If i pass 0 then update dialog shows up. I am adding my code below,


public void getUpdate(int duration, boolean shouldRepeat) {
        new appUpdater.setUpdateFrom(UpdateFrom.GOOGLE_PLAY)
                .setDisplay(Display.DIALOG)
                .setButtonDoNotShowAgain("") // will get rid of DoNotShowAgain
                .setButtonDismiss(R.string.no_thanks)
                .showAppUpdated(true);
        if (duration != 0) {
            appUpdater.showEvery(duration); //Fire in that given duration
        }
        appUpdater.start();
    }
TheTerminatorOfProgramming commented 4 years ago

Try Changing "if (duration != 0)" to "if (duration > 0)"

shakiz commented 4 years ago

Ok.I will try.

shakiz commented 4 years ago

It worked.Thanks