mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
docs(plugin): add docs and usage
This commit is contained in:
parent
bc4dcaae53
commit
80e7eedcae
@ -1,6 +1,8 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* 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](https://github.com/ohh2ahh/AppAvailability).
|
||||
*
|
||||
* ```
|
||||
@ -9,6 +11,19 @@ import {Plugin, Cordova} from './plugin';
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* 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")
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
|
Loading…
Reference in New Issue
Block a user