All Projects β†’ SanojPunchihewa β†’ Inappupdater

SanojPunchihewa / Inappupdater

Licence: mit
Android Library to easily implement in-app updates. Support with a ⭐️ Contributions are welcome! πŸ™Œ

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Inappupdater

react-native-appstore-version-checker
[Deprecated] A react native module to fetch the version of latest app from android playstore or apple app store
Stars: ✭ 88 (-46.67%)
Mutual labels:  playstore
Images To Pdf
An app to convert images to PDF file!
Stars: ✭ 602 (+264.85%)
Mutual labels:  playstore
Flutter Music Player
Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.
Stars: ✭ 1,215 (+636.36%)
Mutual labels:  playstore
Amazefilemanager
Material design file manager for Android
Stars: ✭ 3,626 (+2097.58%)
Mutual labels:  playstore
Immersivedetailsample
A sample application show how to realize immersive parallax effect header like Google Play Store
Stars: ✭ 457 (+176.97%)
Mutual labels:  playstore
Playstoredownloader
A command line tool to download Android applications directly from the Google Play Store by specifying their package name (an initial one-time configuration is required)
Stars: ✭ 664 (+302.42%)
Mutual labels:  playstore
app-screenshot-builder
Play Store and App Store application screenshot builder
Stars: ✭ 26 (-84.24%)
Mutual labels:  playstore
Android Ratingreviews
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Stars: ✭ 110 (-33.33%)
Mutual labels:  playstore
Quill
πŸ‘» [MOVED TO https://github.com/TryGhost/Ghost-Android] The beautiful Android app for your Ghost blog.
Stars: ✭ 552 (+234.55%)
Mutual labels:  playstore
Checknewappversionavailable
It makes a request to Play Store to check if there is a new version of your published app
Stars: ✭ 69 (-58.18%)
Mutual labels:  playstore
Android
An app for creating push notifications for new messages posted to gotify/server.
Stars: ✭ 353 (+113.94%)
Mutual labels:  playstore
React Native Store Review
Rate on App/Play Store directly in your React Native app
Stars: ✭ 437 (+164.85%)
Mutual labels:  playstore
News Ton
Stars: ✭ 7 (-95.76%)
Mutual labels:  playstore
Googleplay Api
Google Play Unofficial Python API
Stars: ✭ 278 (+68.48%)
Mutual labels:  playstore
Latestversionplugin
LatestVersion Plugin for Xamarin and Windows apps
Stars: ✭ 99 (-40%)
Mutual labels:  playstore
PlayStoreLinks Bot
A Reddit Bot that links to Android Apps when requested.
Stars: ✭ 91 (-44.85%)
Mutual labels:  playstore
App Framework
Applications for any device with HTML, CSS and JavaScript - free and open source!
Stars: ✭ 639 (+287.27%)
Mutual labels:  playstore
Fledge
Fledge: A CI/CD tool for Flutter
Stars: ✭ 152 (-7.88%)
Mutual labels:  playstore
Blackberrymanager
A simple solution to download and install BlackBerry apps on your Android device
Stars: ✭ 100 (-39.39%)
Mutual labels:  playstore
Slimsocial For Twitter
Light version of Twitter. Light not only in weight but also in the use.
Stars: ✭ 24 (-85.45%)
Mutual labels:  playstore

Build Status Android Arsenal API License: MIT

InAppUpdater

Android Library to easily implement in-app updates

✏️ Usage

Step 1: Add it in your root build.gradle

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

Step 2: Add the dependency

dependencies {
    implementation 'com.github.SanojPunchihewa:InAppUpdater:1.0.5'
}

Step 3: Initialize the UpdateManager

Declare the UpdateManager in your Activity

    // Declare the UpdateManager
    UpdateManager mUpdateManager;

Initialize the UpdateManager in your onCreate method of the Activity

    // Initialize the Update Manager with the Activity and the Update Mode
    mUpdateManager = UpdateManager.Builder(this).mode(UpdateManagerConstant.FLEXIBLE);
    mUpdateManager.start();

Update Mode

There are two modes

  • Flexible(UpdateManagerConstant.FLEXIBLE) (default) - User can use the app during update download, installation and restart needs to be triggered by user

  • Immediate(UpdateManagerConstant.IMMEDIATE) - User will be blocked until download and installation is finished, restart is triggered automatically

Additionally you can get the Available Version Code of the update and the Number of days passed since the user was notified of an update through the Google Play. You can find these codes in the demo app

mUpdateManager.addUpdateInfoListener(new UpdateInfoListener() {
    @Override
    public void onReceiveVersionCode(final int code) {
        // You can get the available version code of the apk in Google Play
        // Do something here
    }

    @Override
    public void onReceiveStalenessDays(final int days) {
        // Number of days passed since the user was notified of an update through the Google Play
        // If the user hasn't notified this will return -1 as days
        // You can decide the type of update you want to call
    }
});

Monitoring the flexible update download progres

You can monitor the download progress of a Flexible Update using this callback. Note: This is only available for Flexible update mode. You can find more from the official doc

// Callback from Flexible Update Progress
mUpdateManager.addFlexibleUpdateDownloadListener(new FlexibleUpdateDownloadListener() {
    @Override
    public void onDownloadProgress(final long bytesDownloaded, final long totalBytes) {
       // Show a progress bar or anything you want
    }
});

πŸŽ₯ Demo

Flexible Update Immediate Update

❗️ Troubleshoot

  • In-app updates works only with devices running Android 5.0 (API level 21) or higher
  • In-app updates are available only to user accounts that own the app. So, make sure the account you’re using has downloaded your app from Google Play at least once before using the account to test in-app updates.
  • Make sure that the app that you are testing in-app updates with has the same application ID and is signed with the same signing key as the one available from Google Play.
  • Because Google Play can only update an app to a higher version code, make sure the app you are testing as a lower version code than the update version code.

You can find more information at Frequently Asked Questions

πŸ‘ Contributions

Any contributions are welcome!

πŸ“„ License

MIT License

Copyright (c) 2019 Sanoj Punchihewa

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.
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].