mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
Merge in v5 code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Uid
|
||||
@@ -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
|
||||
* }
|
||||
* ```
|
||||
@@ -47,23 +47,23 @@ import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
export class Uid extends IonicNativePlugin {
|
||||
|
||||
/** Get the device Universally Unique Identifier (UUID). */
|
||||
@CordovaProperty
|
||||
@CordovaProperty()
|
||||
UUID: string;
|
||||
|
||||
/** Get the device International Mobile Station Equipment Identity (IMEI). */
|
||||
@CordovaProperty
|
||||
@CordovaProperty()
|
||||
IMEI: string;
|
||||
|
||||
/** Get the device International mobile Subscriber Identity (IMSI). */
|
||||
@CordovaProperty
|
||||
@CordovaProperty()
|
||||
IMSI: string;
|
||||
|
||||
/** Get the sim Integrated Circuit Card Identifier (ICCID). */
|
||||
@CordovaProperty
|
||||
@CordovaProperty()
|
||||
ICCID: string;
|
||||
|
||||
/** Get the Media Access Control address (MAC). */
|
||||
@CordovaProperty
|
||||
@CordovaProperty()
|
||||
MAC: string;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user