mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-27 21:41:25 +08:00
docs(plugins): update docs and plugin params
This commit is contained in:
parent
4d8dc1b9dc
commit
a1bdff6b24
@ -7,8 +7,11 @@ import {Plugin, Cordova} from './plugin';
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-actionsheet).
|
||||
*
|
||||
* @usage
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-actionsheet
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```ts
|
||||
* import {ActionSheet} from 'ionic-native';
|
||||
*
|
||||
|
@ -1,12 +1,14 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name AppAvailability
|
||||
* @description
|
||||
* 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).
|
||||
*
|
||||
* ```
|
||||
* cordova plugin add https://github.com/ohh2ahh/AppAvailability.git
|
||||
* cordova plugin add cordova-plugin-appavailability
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
@ -27,7 +29,7 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/ohh2ahh/AppAvailability.git',
|
||||
plugin: 'cordova-plugin-appavailability',
|
||||
pluginRef: 'appAvailability'
|
||||
})
|
||||
export class AppAvailability {
|
||||
|
@ -3,12 +3,14 @@ import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
declare var window;
|
||||
|
||||
/**
|
||||
* @name AppRate
|
||||
* @description
|
||||
* The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
|
||||
*
|
||||
* Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
|
||||
*
|
||||
* ```
|
||||
* cordova plugin add https://github.com/pushandplay/cordova-plugin-apprate.git
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-apprate
|
||||
* ````
|
||||
*
|
||||
* @usage
|
||||
@ -21,8 +23,9 @@ declare var window;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/pushandplay/cordova-plugin-apprate.git',
|
||||
pluginRef: 'AppRate'
|
||||
plugin: 'cordova-plugin-apprate',
|
||||
pluginRef: 'AppRate',
|
||||
repo: 'https://github.com/pushandplay/cordova-plugin-apprate'
|
||||
})
|
||||
export class AppRate {
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name AppVersion
|
||||
* @description
|
||||
* Reads the version of your app from the target build settings.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-app-version`. For more info, please see the [Cordova App Version docs](https://github.com/whiteoctober/cordova-plugin-app-version).
|
||||
*
|
||||
* ```
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-app-version
|
||||
* ````
|
||||
*
|
||||
|
@ -1,11 +1,13 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name Badge
|
||||
* @description
|
||||
* The essential purpose of badge numbers is to enable an application to inform its users that it has something for them — for example, unread messages — when the application isn’t running in the foreground.
|
||||
*
|
||||
* Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
|
||||
*
|
||||
* ```
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-badge
|
||||
* ```
|
||||
*
|
||||
|
@ -7,6 +7,10 @@ import {Plugin, Cordova} from './plugin';
|
||||
*
|
||||
* Requires Cordova plugin: `phonegap-plugin-barcodescanner`. For more info, please see the [BarcodeScanner plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add phonegap-plugin-barcodescanner
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* BarcodeScanner.scan().then((barcodeData) => {
|
||||
|
@ -3,10 +3,10 @@ import {Observable} from "rxjs/Observable";
|
||||
|
||||
/**
|
||||
* @name Battery Status
|
||||
*
|
||||
* @description
|
||||
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
|
||||
*
|
||||
* ```
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-batterystatus
|
||||
* ```
|
||||
*
|
||||
|
@ -23,6 +23,11 @@ export interface Calendar {
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-calendar`. For more info, please see the [Calendar plugin docs](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-calendar
|
||||
* ```
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-calendar',
|
||||
|
@ -91,6 +91,10 @@ export interface CameraPopoverOptions {
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-camera`. For more info, please see the [Cordova Camera Plugin Docs](https://github.com/apache/cordova-plugin-camera).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-camera
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* Camera.getPicture(options).then((imageData) => {
|
||||
|
@ -1,12 +1,14 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
/**
|
||||
* @name Clipboard
|
||||
* @description
|
||||
* Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
|
||||
*
|
||||
* Requires Cordova plugin: https://github.com/VersoSolutions/CordovaClipboard
|
||||
* For more info, please see the [Clipboard plugin docs](https://github.com/VersoSolutions/CordovaClipboard.git).
|
||||
*
|
||||
* ```
|
||||
* ```shell
|
||||
* cordova plugin add https://github.com/VersoSolutions/CordovaClipboard.git
|
||||
* ```
|
||||
*
|
||||
|
@ -64,6 +64,8 @@ export interface datePickerOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name DatePicker
|
||||
* @description
|
||||
* The DatePicker plugin allows the user to fetch date or time using native dialogs.
|
||||
*
|
||||
* Platforms supported: iOS, Android, Windows
|
||||
@ -72,7 +74,7 @@ export interface datePickerOptions {
|
||||
*
|
||||
* Install the plugin by running the following command:
|
||||
* ```shell
|
||||
* cordova plugin add https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git
|
||||
* cordova plugin add cordova-plugin-datepicker
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
@ -88,7 +90,7 @@ export interface datePickerOptions {
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git',
|
||||
plugin: 'cordova-plugin-datepicker',
|
||||
pluginRef: 'datePicker'
|
||||
})
|
||||
export class DatePicker {
|
||||
|
@ -31,6 +31,10 @@ export interface Device {
|
||||
* @description
|
||||
* Access information about the underlying device and platform.
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-device
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* let info = Device.getDevice();
|
||||
|
@ -35,10 +35,12 @@ export interface accelerometerOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name DeviceMotion
|
||||
* @description
|
||||
* Requires Cordova plugin: `cordova-plugin-device-motion`. For more info, please see the [Device Motion docs](https://github.com/apache/cordova-plugin-device-motion).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add https://github.com/apache/cordova-plugin-device-motion.git
|
||||
* cordova plugin add cordova-plugin-device-motion
|
||||
* ````
|
||||
*
|
||||
* @usage
|
||||
@ -61,8 +63,9 @@ export interface accelerometerOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/apache/cordova-plugin-device-motion.git',
|
||||
pluginRef: 'navigator.accelerometer'
|
||||
plugin: 'cordova-plugin-device-motion',
|
||||
pluginRef: 'navigator.accelerometer',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device-motion'
|
||||
})
|
||||
export class DeviceMotion {
|
||||
|
||||
|
@ -40,10 +40,12 @@ export interface CompassOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name DeviceOrientation
|
||||
* @description
|
||||
* Requires Cordova plugin: `cordova-plugin-device-orientation`. For more info, please see the [Device Orientation docs](https://github.com/apache/cordova-plugin-device-orientation).
|
||||
*
|
||||
* ```
|
||||
* cordova plugin add https://github.com/apache/cordova-plugin-device-orientation.git
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-device-orientation
|
||||
* ````
|
||||
*
|
||||
* @usage
|
||||
@ -64,8 +66,9 @@ export interface CompassOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/apache/cordova-plugin-device-orientation',
|
||||
pluginRef: 'navigator.compass'
|
||||
plugin: 'cordova-plugin-device-orientation',
|
||||
pluginRef: 'navigator.compass',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device-orientation'
|
||||
})
|
||||
export class DeviceOrientation {
|
||||
|
||||
|
@ -18,16 +18,22 @@ export interface promptCallback {
|
||||
/**
|
||||
* @name Dialogs
|
||||
* @description
|
||||
* This plugin gives you ability to access and customize the device native dialogs.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-dialogs`. For more info, please see the [Dialogs plugin docs](https://github.com/apache/cordova-plugin-dialogs).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-dialogs
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/apache/cordova-plugin-dialogs.git',
|
||||
pluginRef: 'navigator.notification'
|
||||
plugin: 'cordova-plugin-dialogs',
|
||||
pluginRef: 'navigator.notification',
|
||||
repo: 'https://github.com/apache/cordova-plugin-dialogs.git'
|
||||
})
|
||||
export class Dialogs {
|
||||
|
||||
|
@ -6,13 +6,18 @@ import {Plugin, Cordova} from './plugin';
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-flashlight`. For more info, please see the [Flashlight plugin docs](https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-flashlight
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git',
|
||||
pluginRef: 'window.plugins.flashlight'
|
||||
plugin: 'cordova-plugin-flashlight',
|
||||
pluginRef: 'window.plugins.flashlight',
|
||||
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git'
|
||||
})
|
||||
export class Flashlight {
|
||||
|
||||
|
@ -99,6 +99,10 @@ export interface GeolocationOptions {
|
||||
*
|
||||
* This API is based on the W3C Geolocation API Specification, and only executes on devices that don't already provide an implementation.
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-geolocation
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ```ts
|
||||
|
@ -25,6 +25,10 @@ export interface ImagePickerOptions {
|
||||
* Requires Cordova plugin: `cordova-plugin-image-picker`.
|
||||
* For more info, please see the https://github.com/wymsee/cordova-imagePicker
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-image-picker
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* ImagePicker.getPictures(options).then((results) => {
|
||||
|
@ -47,11 +47,12 @@ export interface launchNavigatorOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @name LaunchNavigator
|
||||
* @description
|
||||
* Requires Cordova plugin: uk.co.workingedge.phonegap.plugin.launchnavigator. For more info, please see the [LaunchNavigator plugin docs](https://github.com/dpa99c/phonegap-launch-navigator).
|
||||
*
|
||||
* ```
|
||||
* cordova plugin add https://github.com/dpa99c/phonegap-launch-navigator.git
|
||||
* ```shell
|
||||
* cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
@ -64,8 +65,9 @@ export interface launchNavigatorOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/dpa99c/phonegap-launch-navigator.git',
|
||||
pluginRef: 'launchnavigator'
|
||||
plugin: 'uk.co.workingedge.phonegap.plugin.launchnavigator',
|
||||
pluginRef: 'launchnavigator',
|
||||
repo: 'https://github.com/dpa99c/phonegap-launch-navigator.git'
|
||||
})
|
||||
export class LaunchNavigator {
|
||||
|
||||
|
@ -1,8 +1,14 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
/**
|
||||
* @name Local Notifications
|
||||
* @description
|
||||
* This plugin allows you to display local notifications on the device
|
||||
*
|
||||
* Usage:
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-local-notifications
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```ts
|
||||
* // Schedule a single notification
|
||||
* LocalNotifications.schedule({
|
||||
|
@ -134,6 +134,20 @@ export const wrap = function(pluginObj:any, methodName:string, opts:any = {}) {
|
||||
|
||||
/**
|
||||
* Class decorator specifying Plugin metadata. Required for all plugins.
|
||||
*
|
||||
* @usage
|
||||
* ```ts
|
||||
* @Plugin({
|
||||
* name: 'MyPlugin',
|
||||
* plugin: 'cordova-plugin-myplugin',
|
||||
* pluginRef: 'window.myplugin'
|
||||
* })
|
||||
* export class MyPlugin {
|
||||
*
|
||||
* // Plugin wrappers, properties, and functions go here ...
|
||||
*
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function Plugin(config) {
|
||||
return function(cls) {
|
||||
|
@ -252,6 +252,9 @@ declare var PushNotification: {
|
||||
*
|
||||
* Requires Cordova plugin: `phonegap-plugin-push`. For more info, please see the [Push plugin docs](https://github.com/phonegap/phonegap-plugin-push).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add phonegap-plugin-push
|
||||
* ```
|
||||
*
|
||||
* For TypeScript users, see the [Push plugin docs about using TypeScript for custom notifications](https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/TYPESCRIPT.md).
|
||||
*/
|
||||
|
@ -21,17 +21,20 @@ export interface smsOptionsAndroid {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @name SMS
|
||||
* @description
|
||||
*
|
||||
* Requires Cordova plugin: cordova-plugin-sms. For more info, please see the [SMS plugin docs](https://github.com/cordova-sms/cordova-sms-plugin).
|
||||
*
|
||||
* ```
|
||||
* ```shell
|
||||
* cordova plugin add https://github.com/cordova-sms/cordova-sms-plugin.git
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* ```ts
|
||||
*
|
||||
* // Send a text message using default options
|
||||
* SMS.send('6476245170','Hello world!');
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
@ -3,10 +3,23 @@ import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
declare var window;
|
||||
|
||||
/**
|
||||
*
|
||||
* @name StatusBar
|
||||
* @description
|
||||
* Manage the appearance of the native status bar.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-statusbar`. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-statusbar
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```ts
|
||||
* StatuBar.overlaysWebView(true);
|
||||
*
|
||||
* StatusBar.styleDefault();
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-statusbar',
|
||||
|
@ -8,9 +8,24 @@ export interface ToastOptions {
|
||||
addPixelsY?: number;
|
||||
}
|
||||
/**
|
||||
* @name Toast
|
||||
* @description
|
||||
* This plugin allows you to show a native Toast (a little text popup) on iOS, Android and WP8. It's great for showing a non intrusive native notification which is guaranteed always in the viewport of the browser.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-x-toast`. For more info, please see the [Toast plugin docs](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin).
|
||||
*
|
||||
* ```shell
|
||||
* cordova plugin add cordova-plugin-x-toast
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```ts
|
||||
* Toast.show("I'm a toast", 5000, "center").subscribe(
|
||||
* toast => {
|
||||
* console.log(toast);
|
||||
* }
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-x-toast',
|
||||
|
Loading…
x
Reference in New Issue
Block a user