GithubHelp home page GithubHelp logo

dexterouschen / cordova-plugin-app-checker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nonameprovided/cordova-plugin-webview-checker

0.0 3.0 0.0 15 KB

Checks whether certain android application is installed and enabled or not

License: MIT License

Java 74.12% JavaScript 25.88%

cordova-plugin-app-checker's Introduction

cordova-plugin-app-checker

Checks whether certain android application is enabled or not.

Installation

cordova plugin add cordova-plugin-app-checker

Usage

As this plugin is used to detect the version of an installed app.

API

isAppEnabled(packageName)

It returns a promise which will be resolved to true if the app is enabled and false otherwise.

cordova.plugins.appChecker.isAppEnabled('com.android.chrome')
  .then(function(enabled) { console.log(enabled); })
  .catch(function(error) { console.error(error); });

getAppVersion(packageName)

It returns a promise which will be resolved to the string representation of the version number (eg: 57.0.2987.132) or rejected with a Package is not found error if the app is not installed

cordova.plugins.appChecker.getAppVersion('com.android.chrome')
  .then(function(version) { console.log(version); })
  .catch(function(error) { console.error(error); });

openGooglePlayPage(packageName)

A helper function to open the Google Play page of app. Useful for prompting the user to update/enable the app.

cordova.plugins.appChecker.openGooglePlayPage('com.android.chrome')
  .then(function() { console.log('Google Play page of app has been opened.'); })
  .catch(function(error) { console.error(error); });

cordova-plugin-app-checker's People

Contributors

nonameprovided avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.