mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
Merge pull request #144 from panuganti/DeviceEmail
Add DeviceAccounts plugin
This commit is contained in:
commit
54c3a24e59
@ -23,6 +23,7 @@ import {Contacts} from './plugins/contacts';
|
||||
import {DatePicker} from './plugins/datepicker';
|
||||
import {DBMeter} from './plugins/dbmeter';
|
||||
import {Device} from './plugins/device';
|
||||
import {DeviceAccounts} from './plugins/deviceaccounts';
|
||||
import {DeviceMotion} from './plugins/devicemotion';
|
||||
import {DeviceOrientation} from './plugins/deviceorientation';
|
||||
import {Diagnostic} from './plugins/diagnostic';
|
||||
@ -73,6 +74,7 @@ export {
|
||||
DatePicker,
|
||||
DBMeter,
|
||||
Device,
|
||||
DeviceAccounts,
|
||||
DeviceMotion,
|
||||
DeviceOrientation,
|
||||
Dialogs,
|
||||
@ -127,6 +129,7 @@ window['IonicNative'] = {
|
||||
DatePicker: DatePicker,
|
||||
DBMeter: DBMeter,
|
||||
Device: Device,
|
||||
DeviceAccounts: DeviceAccounts,
|
||||
DeviceMotion: DeviceMotion,
|
||||
DeviceOrientation: DeviceOrientation,
|
||||
Dialogs: Dialogs,
|
||||
|
33
src/plugins/deviceaccounts.ts
Normal file
33
src/plugins/deviceaccounts.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import {Cordova, Plugin} from './plugin';
|
||||
declare var window;
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
|
||||
pluginRef: 'plugins.DeviceAccounts',
|
||||
repo: 'https://github.com/loicknuchel/cordova-device-accounts.git'
|
||||
})
|
||||
export class DeviceAccounts {
|
||||
|
||||
/**
|
||||
* Gets all accounts registered on the Android Device
|
||||
*/
|
||||
@Cordova()
|
||||
static get() : Promise<any> {return}
|
||||
|
||||
/**
|
||||
* Get all accounts registred on Android device for requested type
|
||||
*/
|
||||
@Cordova()
|
||||
static getByType(type: string) : Promise<any> {return}
|
||||
|
||||
/**
|
||||
* Get all emails registred on Android device (accounts with 'com.google' type)
|
||||
*/
|
||||
@Cordova()
|
||||
static getEmails() : Promise<any> {return}
|
||||
|
||||
/**
|
||||
* Get the first email registred on Android device
|
||||
*/
|
||||
@Cordova()
|
||||
static getEmail() : Promise<any> {return}
|
||||
}
|
Loading…
Reference in New Issue
Block a user