Skip to content

gecsbernat/Ionic-Cordova-Plugin-InappUpdate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ionic Cordova Plugin InappUpdate

Cordova Plugin for Android In-App Update support. https://developer.android.com/guide/playcore/in-app-updates

Features

  • compatible with ionic 4/5
  • check available update in Play Store
  • download and install update

Platforms

  • android

Installation

$ ionic cordova plugin add https://github.com/gecsbernat/Ionic-Cordova-Plugin-InappUpdate.git

Usage

// declare plugin after imports
declare const InappUpdate: any;

// check for update
InappUpdate.check(
  (success: any) => {
    if (success !== "false") {
      // success = versionCode to update
      console.log("available versionCode:", success);
      InappUpdate.update(
        (success: any) => {
          console.log(success);
        },
        (error: any) => {
          console.log(error);
        }
      );
    } else {
      console.log("no update available");
    }
  },
  (error: any) => {
    console.log(error);
  }
);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published