diff --git a/src/index.ts b/src/index.ts index 059b053ab..73b7acd95 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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, diff --git a/src/plugins/deviceaccounts.ts b/src/plugins/deviceaccounts.ts new file mode 100644 index 000000000..20159690d --- /dev/null +++ b/src/plugins/deviceaccounts.ts @@ -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 {return} + +/** + * Get all accounts registred on Android device for requested type + */ + @Cordova() + static getByType(type: string) : Promise {return} + +/** + * Get all emails registred on Android device (accounts with 'com.google' type) + */ + @Cordova() + static getEmails() : Promise {return} + +/** + * Get the first email registred on Android device + */ + @Cordova() + static getEmail() : Promise {return} +} \ No newline at end of file