mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
Merge branch 'master' into v5
This commit is contained in:
commit
83680aad96
@ -1,8 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin, getPromise } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface EmailComposerOptions {
|
||||
|
||||
/**
|
||||
* App to send the email with
|
||||
*/
|
||||
@ -43,9 +47,12 @@ export interface EmailComposerOptions {
|
||||
*/
|
||||
isHtml?: boolean;
|
||||
|
||||
/**
|
||||
* Content type of the email (Android only)
|
||||
*/
|
||||
type?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name Email Composer
|
||||
* @description
|
||||
@ -106,11 +113,10 @@ export interface EmailComposerOptions {
|
||||
plugin: 'cordova-plugin-email-composer',
|
||||
pluginRef: 'cordova.plugins.email',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-email-composer',
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows', 'macOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class EmailComposer extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Verifies if sending emails is supported on the device.
|
||||
*
|
||||
@ -171,8 +177,7 @@ export class EmailComposer extends IonicNativePlugin {
|
||||
* @param packageName {string} The package name
|
||||
*/
|
||||
@Cordova()
|
||||
addAlias(alias: string, packageName: string): void {
|
||||
}
|
||||
addAlias(alias: string, packageName: string): void {}
|
||||
|
||||
/**
|
||||
* Displays the email composer pre-filled with data.
|
||||
@ -188,5 +193,4 @@ export class EmailComposer extends IonicNativePlugin {
|
||||
open(options: EmailComposerOptions, scope?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,24 @@ export interface ImageResizerOptions {
|
||||
*/
|
||||
uri: string;
|
||||
|
||||
/**
|
||||
* The name of the folder the image should be put
|
||||
* (Android only)
|
||||
*/
|
||||
folderName?: string;
|
||||
|
||||
/**
|
||||
* A custom name for the file. Default name is a timestamp. You have to set this value on iOS
|
||||
*/
|
||||
fileName?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* Quality given as Number for the quality of the new image
|
||||
* (Android and iOS only)
|
||||
*/
|
||||
quality?: number;
|
||||
|
||||
/**
|
||||
* The width of the new image
|
||||
*/
|
||||
@ -18,22 +36,10 @@ export interface ImageResizerOptions {
|
||||
height: number;
|
||||
|
||||
/**
|
||||
* The name of the folder the image should be put
|
||||
* (Android only)
|
||||
* Whether or not to return a base64 encoded image string instead of the path to the resized image.
|
||||
* iOS only
|
||||
*/
|
||||
folderName?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* Quality given as Number for the quality of the new image
|
||||
* (Android and iOS only)
|
||||
*/
|
||||
quality?: number;
|
||||
|
||||
/**
|
||||
* A custom name for the file. Default name is a timestamp. You have to set this value on iOS
|
||||
*/
|
||||
fileName?: string;
|
||||
base64?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface QRScannerStatus {
|
||||
@ -86,11 +87,6 @@ export interface QRScannerStatus {
|
||||
* scanSub.unsubscribe(); // stop scanning
|
||||
* });
|
||||
*
|
||||
* // show camera preview
|
||||
* this.qrScanner.show();
|
||||
*
|
||||
* // wait for user to scan something, then the observable callback will be called
|
||||
*
|
||||
* } else if (status.denied) {
|
||||
* // camera permission was permanently denied
|
||||
* // you must use QRScanner.openSettings() method to guide the user to the settings page
|
||||
|
@ -1,28 +1,23 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
* Options for sending an SMS
|
||||
*/
|
||||
export interface SmsOptions {
|
||||
|
||||
/**
|
||||
* Set to true to replace \n by a new line. Default: false
|
||||
*/
|
||||
replaceLineBreaks?: boolean;
|
||||
|
||||
android?: SmsOptionsAndroid;
|
||||
|
||||
}
|
||||
|
||||
export interface SmsOptionsAndroid {
|
||||
|
||||
/**
|
||||
* Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app.
|
||||
*/
|
||||
intent?: string;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,7 +52,6 @@ export interface SmsOptionsAndroid {
|
||||
})
|
||||
@Injectable()
|
||||
export class SMS extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Sends sms to a number
|
||||
* @param phoneNumber {string|Array<string>} Phone number
|
||||
@ -69,9 +63,11 @@ export class SMS extends IonicNativePlugin {
|
||||
successIndex: 3,
|
||||
errorIndex: 4
|
||||
})
|
||||
send(phoneNumber: string | string[],
|
||||
message: string,
|
||||
options?: SmsOptions): Promise<any> {
|
||||
send(
|
||||
phoneNumber: string | string[],
|
||||
message: string,
|
||||
options?: SmsOptions
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -85,5 +81,4 @@ export class SMS extends IonicNativePlugin {
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
* @name Social Sharing
|
||||
* @description
|
||||
@ -53,7 +52,12 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
successIndex: 4,
|
||||
errorIndex: 5
|
||||
})
|
||||
share(message?: string, subject?: string, file?: string | string[], url?: string): Promise<any> {
|
||||
share(
|
||||
message?: string,
|
||||
subject?: string,
|
||||
file?: string | string[],
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -65,7 +69,13 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
shareWithOptions(options: { message?: string, subject?: string, files?: string | string[], url?: string, chooserTitle?: string }): Promise<any> {
|
||||
shareWithOptions(options: {
|
||||
message?: string;
|
||||
subject?: string;
|
||||
files?: string | string[];
|
||||
url?: string;
|
||||
chooserTitle?: string;
|
||||
}): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -83,7 +93,13 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 6,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
canShareVia(appName: string, message?: string, subject?: string, image?: string, url?: string): Promise<any> {
|
||||
canShareVia(
|
||||
appName: string,
|
||||
message?: string,
|
||||
subject?: string,
|
||||
image?: string,
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -115,11 +131,14 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 4,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
shareViaFacebook(message: string, image?: string, url?: string): Promise<any> {
|
||||
shareViaFacebook(
|
||||
message: string,
|
||||
image?: string,
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shares directly to Facebook with a paste message hint
|
||||
* @param message {string}
|
||||
@ -133,7 +152,12 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 5,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
shareViaFacebookWithPasteMessageHint(message: string, image?: string, url?: string, pasteMessageHint?: string): Promise<any> {
|
||||
shareViaFacebookWithPasteMessageHint(
|
||||
message: string,
|
||||
image?: string,
|
||||
url?: string,
|
||||
pasteMessageHint?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -162,7 +186,11 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 4,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
shareViaWhatsApp(message: string, image?: string, url?: string): Promise<any> {
|
||||
shareViaWhatsApp(
|
||||
message: string,
|
||||
image?: string,
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -179,7 +207,12 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 5,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
shareViaWhatsAppToReceiver(receiver: string, message: string, image?: string, url?: string): Promise<any> {
|
||||
shareViaWhatsAppToReceiver(
|
||||
receiver: string,
|
||||
message: string,
|
||||
image?: string,
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -222,7 +255,14 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
successIndex: 6,
|
||||
errorIndex: 7
|
||||
})
|
||||
shareViaEmail(message: string, subject: string, to: string[], cc?: string[], bcc?: string[], files?: string | string[]): Promise<any> {
|
||||
shareViaEmail(
|
||||
message: string,
|
||||
subject: string,
|
||||
to: string[],
|
||||
cc?: string[],
|
||||
bcc?: string[],
|
||||
files?: string | string[]
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -240,7 +280,13 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
errorIndex: 6,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
shareVia(appName: string, message: string, subject?: string, image?: string, url?: string): Promise<any> {
|
||||
shareVia(
|
||||
appName: string,
|
||||
message: string,
|
||||
subject?: string,
|
||||
image?: string,
|
||||
url?: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -252,6 +298,17 @@ export class SocialSharing extends IonicNativePlugin {
|
||||
sync: true,
|
||||
platforms: ['iOS']
|
||||
})
|
||||
setIPadPopupCoordinates(targetBounds: string): void {
|
||||
setIPadPopupCoordinates(targetBounds: string): void {}
|
||||
|
||||
/**
|
||||
* Save an array of images to the camera roll
|
||||
* @param {string|string[]} fileOrFileArray Single or multiple files
|
||||
* @returns {Promise<any> }
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
saveToPhotoAlbum(fileOrFileArray: string | string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,11 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
* display listener popup window with prompt (default `true`)
|
||||
*/
|
||||
showPopup?: boolean;
|
||||
|
||||
/**
|
||||
* Allow partial results to be returned (default `false`)
|
||||
*/
|
||||
showPartial?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -129,9 +134,7 @@ export class SpeechRecognition extends IonicNativePlugin {
|
||||
/**
|
||||
* Stop the recognition process
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Cordova()
|
||||
stopListening(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
@ -40,12 +40,11 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
pluginName: 'Uid',
|
||||
plugin: 'cordova-plugin-uid',
|
||||
pluginRef: 'cordova.plugins.uid',
|
||||
repo: 'https://github.com/hygieiasoft/cordova-plugin-uid',
|
||||
repo: 'https://github.com/lionelhe/cordova-plugin-uid',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class Uid extends IonicNativePlugin {
|
||||
|
||||
/** Get the device Universally Unique Identifier (UUID). */
|
||||
@CordovaProperty()
|
||||
UUID: string;
|
||||
|
42
src/@ionic-native/plugins/uptime/index.ts
Normal file
42
src/@ionic-native/plugins/uptime/index.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Uptime
|
||||
* @description
|
||||
* This plugin return the device uptime, without sleep time.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Uptime } from '@ionic-native/uptime';
|
||||
*
|
||||
* constructor(private uptime: Uptime) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.uptime.getUptime()
|
||||
* .then((uptime: any) => console.log(uptime))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Uptime',
|
||||
plugin: 'cordova-plugin-uptime',
|
||||
pluginRef: 'Uptime',
|
||||
repo: 'https://github.com/s1lviu/cordova-plugin-uptime',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class Uptime extends IonicNativePlugin {
|
||||
/**
|
||||
* This function return system uptime
|
||||
* @return {Promise<string>} Returns a promise that return the uptime in milliseconds
|
||||
*/
|
||||
@Cordova()
|
||||
getUptime(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user