All Projects → javiersantos → Appupdater

javiersantos / Appupdater

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

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Appupdater

Oops No Internet
Oops! No Internet! No internet dialog and snackbar for the rescue!
Stars: ✭ 79 (-95.59%)
Mutual labels:  dialog, snackbar
flutter examples
Random flutter examples
Stars: ✭ 18 (-99%)
Mutual labels:  dialog, snackbar
Flash
⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.
Stars: ✭ 174 (-90.3%)
Mutual labels:  dialog, snackbar
smart-show
Toast # Snackbar # Dialog
Stars: ✭ 500 (-72.11%)
Mutual labels:  dialog, snackbar
Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
Stars: ✭ 136 (-92.41%)
Mutual labels:  dialog, snackbar
product-release-notes
Release notes page for your product that follows iTunes and Google Play
Stars: ✭ 24 (-98.66%)
Mutual labels:  changelog, google-play
denbun
Adjust showing frequency of Android app messages, and to be more user friendly 🐦
Stars: ✭ 17 (-99.05%)
Mutual labels:  dialog, snackbar
Smart Show
Toast & Snackbar & TopBar & Dialog
Stars: ✭ 430 (-76.02%)
Mutual labels:  dialog, snackbar
Livesmashbar
An elegant looking and easy to use informative library with LiveData integration for Android.
Stars: ✭ 107 (-94.03%)
Mutual labels:  dialog, snackbar
Vuetify Toast Snackbar
Basic Vue toast service that uses Vuetify Snackbar component.
Stars: ✭ 123 (-93.14%)
Mutual labels:  snackbar
Gh Release
Create a github release for a node package.
Stars: ✭ 132 (-92.64%)
Mutual labels:  changelog
Update Notifier
The idea for this module came from the desire to apply the browser update strategy to CLI tools, where everyone is always on the latest version. We first tried automatic updating, which we discovered wasn't popular. This is the second iteration of that idea, but limited to just update notifications.
Stars: ✭ 1,594 (-11.1%)
Mutual labels:  updater
Release Notes Generator
📋 semantic-release plugin to generate changelog content with conventional-changelog
Stars: ✭ 123 (-93.14%)
Mutual labels:  changelog
React Native Material Dialog
Material design dialogs for React Native 💬
Stars: ✭ 135 (-92.47%)
Mutual labels:  dialog
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (-93.25%)
Mutual labels:  dialog
Gydl
gydl (Graphical Youtube-dl) is a GUI wrapper around the already existing youtube-dl program.
Stars: ✭ 136 (-92.41%)
Mutual labels:  dialog
Panter Dialog
Panter Dialog is an stylish android library that helps users add cool features like adding header and header logos
Stars: ✭ 119 (-93.36%)
Mutual labels:  dialog
Kymsu
Keep Your macOs Stuff Updated (KYMSU)
Stars: ✭ 119 (-93.36%)
Mutual labels:  updater
Chyle
Changelog generator : use a git repository and various data sources and publish the result on external services
Stars: ✭ 137 (-92.36%)
Mutual labels:  changelog
Djsemimodalviewcontroller
Simple semi modal presentation dialog with stacked content
Stars: ✭ 137 (-92.36%)
Mutual labels:  dialog

AppUpdater

Android Library

Android Library that checks for updates on Google Play, GitHub, Amazon, F-Droid or your own server. This library notifies your apps' updates by showing a Material dialog, Snackbar or notification. Check out the wiki.

Sample Project

You can download the latest sample APK from Google Play:

How to include

Add the repository to your project build.gradle:

repositories {
    maven {
        url "https://jitpack.io"
    }
}

And add the library to your module build.gradle:

dependencies {
    implementation 'com.github.javiersantos:AppUpdater:2.7'
}

Usage

Activity / Fragment

By default, the basic usage will show a default dialog when a new version is found on the Play Store (otherwise nothing will be shown). By calling the .start() method, the library will work in background. You can cancel it at any time by calling .stop(). Other customizations are explained below.

Activity

AppUpdater appUpdater = new AppUpdater(this);
appUpdater.start();

Fragment

AppUpdater appUpdater = new AppUpdater(getActivity());
appUpdater.start();

Customizations (Wiki)

Displaying a dialog, Snackbar or notification

The default usage is configured to display a dialog. However, there are other ways to show the update notice.

new AppUpdater(this)
	.setDisplay(Display.SNACKBAR)
	.setDisplay(Display.DIALOG)
	.setDisplay(Display.NOTIFICATION)
	...

When using Display.DIALOG, you can make the dialog dismissable when touching outside by using .setCancelable(false) (enabled by default).

When using Display.SNACKBAR, you can change the duration by using .setDuration(Duration.NORMAL) (default) or .setDuration(Duration.INDEFINITE).

Providing a source for the updates

By default the library will check for updates on the Play Store. However, there are other alternatives, such as GitHub, Amazon, F-Droid or using your own server.

new AppUpdater(this)
	.setUpdateFrom(UpdateFrom.GITHUB)
	.setUpdateFrom(UpdateFrom.GOOGLE_PLAY)
	.setUpdateFrom(UpdateFrom.AMAZON)
	.setUpdateFrom(UpdateFrom.FDROID)
	.setUpdateFrom(UpdateFrom.XML)
	.setUpdateFrom(UpdateFrom.JSON)
	...

When using GitHub you must provide the repo where the library will check for updates: .setGitHubUserAndRepo("javiersantos", "AppUpdater"). Check out the wiki for more details.

When using the XML source you must upload a .xml file somewhere on the Internet following the structure explained in the wiki and add the URL as shown in this example: .setUpdateXML("https://raw.githubusercontent.com/javiersantos/AppUpdater/master/app/update-changelog.xml").

When using the JSON source you must upload a .json file somewhere on the Internet following the structure explained in the wiki and add the URL as shown in this example: .setUpdateJSON("https://raw.githubusercontent.com/javiersantos/AppUpdater/master/app/update-changelog.json").

A detailed description with examples is available at: https://github.com/javiersantos/AppUpdater/wiki

Setting the frequency to show updates

By default, a dialog/Snackbar/notification will be shown whenever a new version is found. However, this can be set to show only every X times that the app ascertains that a new update is available.

new AppUpdater(this)
	.showEvery(5)
	...

You can also show the dialog, Snackbar or notification although there aren't updates by using .showAppUpdated(true) (disabled by default).

Customizing the title, description, buttons and more

new AppUpdater(this)
	.setTitleOnUpdateAvailable("Update available")
	.setContentOnUpdateAvailable("Check out the latest version available of my app!")
	.setTitleOnUpdateNotAvailable("Update not available")
	.setContentOnUpdateNotAvailable("No update available. Check for updates again later!")
	.setButtonUpdate("Update now?")
	.setButtonUpdateClickListener(...)
	.setButtonDismiss("Maybe later")
	.setButtonDismissClickListener(...)
	.setButtonDoNotShowAgain("Huh, not interested")
	.setButtonDoNotShowAgainClickListener(...)
	.setIcon(R.drawable.ic_update) // Notification icon 
	.setCancelable(false) // Dialog could not be dismissable
	...

By default, the "Don't show again" button will be displayed. Use .setButtonDoNotShowAgain(null) to hide the button.

AppUpdaterUtils

The AppUpdaterUtils class works in the same way that the AppUpdater class does, but it won't display any dialog, Snackbar or notification. When using the AppUpdaterUtils class you must provide a custom callback that will be called when the latest version has been checked.

Using custom callbacks

Adding a callback to the builder allows you to customize what will happen when the latest update has been checked. Keep in mind that when using this method you must be aware of displaying any dialog, snackbar or whatever you want to let the user know that there is a new update available.

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("Latest Version", update.getLatestVersion());
	    Log.d("Latest Version Code", update.getLatestVersionCode());
	    Log.d("Release notes", update.getReleaseNotes());
	    Log.d("URL", update.getUrlToDownload());
	    Log.d("Is update available?", Boolean.toString(isUpdateAvailable));
        }
        
        @Override
        public void onFailed(AppUpdaterError error) {
            Log.d("AppUpdater Error", "Something went wrong");
        }
     });
appUpdaterUtils.start();

AppUpdater

License

Copyright 2016 Javier Santos

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].