mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 00:12:53 +08:00
Merge remote-tracking branch 'origin/master' into v5
This commit is contained in:
commit
f414e0e081
@ -153,11 +153,11 @@ export class Calendar extends IonicNativePlugin {
|
||||
/**
|
||||
* Create a calendar. (iOS only)
|
||||
*
|
||||
* @param {string | CalendarOptions} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
|
||||
* @param {string | NameOrOptions} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
|
||||
* @returns {Promise<any>} Returns a Promise
|
||||
*/
|
||||
@Cordova()
|
||||
createCalendar(nameOrOptions: string | CalendarOptions): Promise<any> {
|
||||
createCalendar(nameOrOptions: string | NameOrOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface IOSFilePickerPosition {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @name iOS File Picker
|
||||
* @description
|
||||
@ -20,6 +27,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* .catch(err => console.log('Error', err));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* IOSFilePickerPosition
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'iOS File Picker',
|
||||
@ -32,10 +41,17 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
export class IOSFilePicker extends IonicNativePlugin {
|
||||
/**
|
||||
* Open a file
|
||||
* @params {string | string[]} [utis]
|
||||
* @params {IOSFilePickerPosition} [position] Set the position of the rectangle where the file picker should show up.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
pickFile(): Promise<string> {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
pickFile(
|
||||
utis?: string | string[],
|
||||
position?: IOSFilePickerPosition
|
||||
): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -505,9 +505,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
* native layer acknowledged the dispatch of the monitoring request.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
startMonitoringForRegion(region: BeaconRegion): Promise<string> {
|
||||
return;
|
||||
}
|
||||
startMonitoringForRegion(region: Region): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Stop monitoring the specified region. It is valid to call
|
||||
@ -524,9 +522,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
* native layer acknowledged the dispatch of the request to stop monitoring.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
stopMonitoringForRegion(region: BeaconRegion): Promise<void> {
|
||||
return;
|
||||
}
|
||||
stopMonitoringForRegion(region: Region): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Request state the for specified region. When result is ready
|
||||
@ -561,9 +557,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
* native layer acknowledged the dispatch of the monitoring request.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
startRangingBeaconsInRegion(region: BeaconRegion): Promise<void> {
|
||||
return;
|
||||
}
|
||||
startRangingBeaconsInRegion(region: Region): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Stop ranging the specified region. It is valid to call
|
||||
@ -580,9 +574,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
* native layer acknowledged the dispatch of the request to stop monitoring.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
stopRangingBeaconsInRegion(region: BeaconRegion): Promise<void> {
|
||||
return;
|
||||
}
|
||||
stopRangingBeaconsInRegion(region: Region): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Queries the native layer to determine the current authorization in effect.
|
||||
|
@ -7,6 +7,20 @@ import {
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface IntentOptions {
|
||||
requestCode?: number;
|
||||
type?: string;
|
||||
package?: string;
|
||||
url?: string;
|
||||
extras?: object;
|
||||
action?: string;
|
||||
component?: {
|
||||
package: string;
|
||||
class: string;
|
||||
};
|
||||
flags?: number[];
|
||||
};
|
||||
|
||||
/**
|
||||
* @name Web Intent
|
||||
* @description
|
||||
@ -30,6 +44,8 @@ import { Observable } from 'rxjs';
|
||||
* this.webIntent.startActivity(options).then(onSuccess, onError);
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* IntentOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'WebIntent',
|
||||
@ -103,30 +119,21 @@ export class WebIntent extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Launches an Android intent
|
||||
* @param options {Object} { action: any, url: string, type?: string }
|
||||
* @param options {IntentOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startActivity(options: {
|
||||
action: any;
|
||||
extras?: any;
|
||||
url: string;
|
||||
type?: string;
|
||||
}): Promise<any> {
|
||||
startActivity(options: IntentOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts a new activity and return the result to the application
|
||||
* @param options {Object} { action: any, url: string, type?: string }
|
||||
* @param options {IntentOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startActivityForResult(options: {
|
||||
action: any;
|
||||
url: string;
|
||||
type?: string;
|
||||
}): Promise<any> {
|
||||
startActivityForResult(options: IntentOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -172,27 +179,21 @@ export class WebIntent extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Sends a custom intent passing optional extras
|
||||
* @param options {Object} { action: string, extras?: { option: boolean } }
|
||||
* @param options {IntentOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sendBroadcast(options: {
|
||||
action: string;
|
||||
extras?: { option: boolean };
|
||||
}): Promise<any> {
|
||||
sendBroadcast(options: IntentOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request that a given application service be started
|
||||
* @param options {Object} { action: string, extras?: { option: boolean } }
|
||||
* @param options {IntentOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startService(options: {
|
||||
action: string;
|
||||
extras?: { option: boolean };
|
||||
}): Promise<any> {
|
||||
startService(options: IntentOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user