mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-12-19 05:19:42 +08:00
Docs
This commit is contained in:
@@ -7,8 +7,9 @@ import {NativePlugin} from '../plugin';
|
||||
* Open installed apps on the device. Note: Android and iOS have different ways of
|
||||
* opening and specifying launch params, so they have separate launch functions.
|
||||
*
|
||||
* Example:
|
||||
* @usage
|
||||
*
|
||||
* ```js
|
||||
* if(platform.is('ios') {
|
||||
* AppLinks.check('twitter://').then((installed) => {
|
||||
* AppLinks.openIOS('twitter://user?screen_name=ionicframework')
|
||||
@@ -20,6 +21,7 @@ import {NativePlugin} from '../plugin';
|
||||
* AppLinks.openAndroid([["action", "VIEW"], ['twitter://user?screen_name=ionicframework']])
|
||||
* })
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@NativePlugin({
|
||||
name: 'AppLinks',
|
||||
|
||||
@@ -3,6 +3,26 @@ import * as Rx from 'rx';
|
||||
import * as util from 'ionic/util';
|
||||
import {NativePlugin} from '../plugin';
|
||||
|
||||
/**
|
||||
* Scan barcodes and QR codes.
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ## Scanning a code
|
||||
*
|
||||
* ```js
|
||||
* Barcode.scan().then((data) => {
|
||||
* console.log("Result: " + result.text + "\n" + "Format: " + result.format + "\n" + "Cancelled: " + result.cancelled);
|
||||
* }, (err) => {
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* ## Encoding data
|
||||
*
|
||||
* ```js
|
||||
* Barcode.encode(Barcode.TEXT_TYPE).then((data) => {}, (fail) => {});
|
||||
* ```
|
||||
*/
|
||||
@NativePlugin({
|
||||
name: 'Barcode',
|
||||
platforms: ['ios', 'android'],
|
||||
|
||||
Reference in New Issue
Block a user