mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-21 17:36:27 +08:00
parent
a81a4d3edf
commit
439960092e
@ -1,8 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaCheck,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
export interface EmailComposerOptions {
|
export interface EmailComposerOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App to send the email with
|
* App to send the email with
|
||||||
*/
|
*/
|
||||||
@ -43,9 +47,12 @@ export interface EmailComposerOptions {
|
|||||||
*/
|
*/
|
||||||
isHtml?: boolean;
|
isHtml?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Content type of the email (Android only)
|
||||||
|
*/
|
||||||
|
type?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Email Composer
|
* @name Email Composer
|
||||||
* @description
|
* @description
|
||||||
@ -106,11 +113,10 @@ export interface EmailComposerOptions {
|
|||||||
plugin: 'cordova-plugin-email-composer',
|
plugin: 'cordova-plugin-email-composer',
|
||||||
pluginRef: 'cordova.plugins.email',
|
pluginRef: 'cordova.plugins.email',
|
||||||
repo: 'https://github.com/katzer/cordova-plugin-email-composer',
|
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()
|
@Injectable()
|
||||||
export class EmailComposer extends IonicNativePlugin {
|
export class EmailComposer extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies if sending emails is supported on the device.
|
* Verifies if sending emails is supported on the device.
|
||||||
*
|
*
|
||||||
@ -148,7 +154,9 @@ export class EmailComposer extends IonicNativePlugin {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
requestPermission(): Promise<boolean> { return; }
|
requestPermission(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the app has a permission to access email accounts information
|
* Checks if the app has a permission to access email accounts information
|
||||||
@ -158,7 +166,9 @@ export class EmailComposer extends IonicNativePlugin {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
hasPermission(): Promise<boolean> { return; }
|
hasPermission(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new mail app alias.
|
* Adds a new mail app alias.
|
||||||
@ -167,7 +177,7 @@ export class EmailComposer extends IonicNativePlugin {
|
|||||||
* @param packageName {string} The package name
|
* @param packageName {string} The package name
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addAlias(alias: string, packageName: string): void { }
|
addAlias(alias: string, packageName: string): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the email composer pre-filled with data.
|
* Displays the email composer pre-filled with data.
|
||||||
@ -180,6 +190,7 @@ export class EmailComposer extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
open(options: EmailComposerOptions, scope?: any): Promise<any> { return; }
|
open(options: EmailComposerOptions, scope?: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user