fix(uuid): add correct plugin source

fix: #2324
This commit is contained in:
Daniel 2018-04-06 22:34:06 +02:00
parent 859cbfcfc6
commit a81a4d3edf

View File

@ -13,12 +13,12 @@ import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
*
* constructor(private uid: Uid, private androidPermissions: AndroidPermissions) { }
*
*
*
* async getImei() {
* const { hasPermission } = await this.androidPermissions.checkPermission(
* this.androidPermissions.PERMISSION.READ_PHONE_STATE
* );
*
*
* if (!hasPermission) {
* const result = await this.androidPermissions.requestPermission(
* this.androidPermissions.PERMISSION.READ_PHONE_STATE
@ -27,11 +27,11 @@ import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
* if (!result.hasPermission) {
* throw new Error('Permissions required');
* }
*
*
* // ok, a user gave us permission, we can get him identifiers after restart app
* return;
* }
*
*
* return this.uid.IMEI
* }
* ```
@ -40,30 +40,23 @@ import { Plugin, CordovaProperty, IonicNativePlugin } 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;
@CordovaProperty UUID: string;
/** Get the device International Mobile Station Equipment Identity (IMEI). */
@CordovaProperty
IMEI: string;
@CordovaProperty IMEI: string;
/** Get the device International mobile Subscriber Identity (IMSI). */
@CordovaProperty
IMSI: string;
@CordovaProperty IMSI: string;
/** Get the sim Integrated Circuit Card Identifier (ICCID). */
@CordovaProperty
ICCID: string;
@CordovaProperty ICCID: string;
/** Get the Media Access Control address (MAC). */
@CordovaProperty
MAC: string;
@CordovaProperty MAC: string;
}