Skip to content
Stanislav Koshutsky edited this page Mar 16, 2017 · 1 revision

UpdateChecker purpose is to check if there is a new version of application available at the Google Play Store.

It has several constructors and since it works asynchronously its result will be delivered to your application using GreenRobot's EventBus. It has special event-object (NewVersionAvailableEvent) to use by default or you could pass your own object if you wish.
NewVersionAvailableEvent has no any fields it intended to inform you about update only.

If you need to show AlertDialog in case if update available you could use following methods:

public static AlertDialog.Builder showUpdateAvailableDialog(final Activity activity)  
public static AlertDialog.Builder showUpdateAvailableDialog(final Activity activity,
                                                            int titleResId,
                                                            int messageResId,
                                                            int labelYesResId,
                                                            int labelNoResId)  
public static AlertDialog.Builder showUpdateAvailableDialog(final Activity activity,
                                                            final String title,
                                                            final String message,
                                                            final String labelYes,
                                                            final String labelNo)  

Dialog yes button will send intent to open Google Store on application page that is the only action user needs to take is to press Update button there.

Clone this wiki locally