mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +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';
|
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).
|
* 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
|
* @usage
|
||||||
* ```js
|
* ```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({
|
@Plugin({
|
||||||
|
Loading…
Reference in New Issue
Block a user