App Availability

Improve this doc

$ ionic plugin add cordova-plugin-appavailability

Repo: https://github.com/ohh2ahh/AppAvailability

This plugin allows you to check if an app is installed on the user's device. It requires an URI Scheme (e.g. twitter://) on iOS or a Package Name (e.g com.twitter.android) on Android.

Requires Cordova plugin: cordova-plugin-appavailability. For more info, please see the AppAvailability plugin docs.

Supported platforms

Usage

import {AppAvailability} from 'ionic-native';


var app;

if(device.platform === 'iOS') {
  app = 'twitter://';
}else if(device.platform === 'Android'){
  app = 'com.twitter.android';
}

AppAvailability.check(app)
  .then(
    yes => console.log(app + " is available"),
    no => console.log(app + " is NOT available")
  );

Static Methods

check(app)

Checks if an app is available on device

Param Type Details
app

Package name on android, or URI scheme on iOS

Returns: Promise<boolean>

API

Native

General