UpdateHandler

Additional

Language
Java
Version
N/A
Created
May 31, 2016
Updated
Jan 1, 2017
Owner
AndroidMad / Mushtaq M A (androidmads)
Contributor
AndroidMad / Mushtaq M A (androidmads)
1
Activity
Badge
Generate
Download
Source code
APK file

Promotion

UpdateHandler

Update Checker For Google Play

Featured In

Created By

How to Import the Library:

Gradle:

compile 'androidmads.updatehandler:updatehandler:1.0.3'

Maven:

<dependency>
  <groupId>androidmads.updatehandler</groupId>
  <artifactId>updatehandler</artifactId>
  <version>1.0.3</version>
  <type>pom</type>
</dependency>

How to use this Library:

After importing this library, use the following lines to check version update for your application automatically.

/** 
* This library works in release mode only with the same JKS key used for 
* your Previous Version
*/
UpdateHandler updateHandler = new UpdateHandler(MainActivity.this);
// to start version checker
updateHandler.start();
// prompting intervals
updateHandler.setCount(2);
// to print new features added automatically
updateHandler.setWhatsNew(true);
// to enable or show default dialog prompt for version update
updateHandler.showDefaultAlert(true);
// listener for custom update prompt
updateHandler.setOnUpdateListener(new UpdateListener() {
    @Override
    public void onUpdateFound(boolean newVersion, String whatsNew) {
        Log.v("Update", String.valueOf(newVersion));
        Log.v("Update", whatsNew);
    }
});

Demo:

Alert Without What' New

Alert With What' New

Update Prompt with Custom Listener

License:

The MIT License (MIT)

Copyright (c) 2016 AndroidMad

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
IN THE SOFTWARE.