mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
Add DeviceAccounts plugin
This commit is contained in:
parent
e73c99b28a
commit
31c298b556
@ -21,6 +21,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';
|
||||
@ -66,6 +67,7 @@ export {
|
||||
DatePicker,
|
||||
DBMeter,
|
||||
Device,
|
||||
DeviceAccounts,
|
||||
DeviceMotion,
|
||||
DeviceOrientation,
|
||||
Dialogs,
|
||||
@ -115,6 +117,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