I am trying to read Uid.IMEI from Ionic Native Uid plugin. I handled the runtime permission issue for Android 6 using Diagnostic, and then tried to read Uid.IMEI. But it is showing
Native: tried calling Uid.IMEI, but the Uid plugin is not installed.
Install the Uid plugin: 'ionic cordova plugin add https://github.com/hygieiasoft/cordova-plugin-uid'
I have tried removing and then re-installing the plugin. The issue is , this message is shown only after installing the app and then opening it . Later on, I don’t find this msg , rather IMEI is read perfectly .
After installing the app, the requestRuntimePermission block is executed and after user accepts , Uid plugin tried to read IMEI, here my app does not find the plugin ! After that, I exit the app, reopen it , then see the permission is already granted and IMEI is found.
IMEI granted ----------
I saw some solutions referring to async/await. I am using Ionic framework 2 , and can’t update to Ionic 3 now, since my project is a bit complex. Plz suggest anyone if it can be solved avoiding async/await.
Did you find any solution for this?
I am also facing the same issue after allowing the permissions it saying that Uid plugin is not installed.
If you solved it.
Please share the solution.
Thank you, bro. I have write it below and it works. But, while reloading the apps, the white blank page is appearing and it’s awkward to see it.How to remove that ? bro.
Another question is if it’s possible to give android permission as default without asking prompt ? Many Thanks.
if(res.hasPermission){
console.log(“Permitted!”);
}else{
this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.READ_PHONE_STATE).then( res => {