GetDeviceId: Neither user 11279 nor current process has android.permision.READ_PHONE_STATE


#1

Hello, my app is returning this error on the first boot, the app asks for the required permissions, but the error appears before even allowing the user time to accept the permissions, since after accepting the permissions the error no longer appears, only appears on the first boot, which can cause a shock on the user when he installs the app. I’ve seen some articles related to this topic, and tried all the alternatives I had on these topics but none worked, so I decided to create this specific to my problem.


#2

which components are you using?
do you use the phone call component?
if not, did you try to drag a phone call component into the working area without using it to see, if that fixes the problem?

Taifun


#3

It seems that you are posting this topic on multi communities, which builder did you use to build your app ?


#4

can you explain more ? which block / component are you trying to use ? Did you use any extension ? Any Screenshot ? What do you prefer to see ?


#6

I’m using the TaifunTM extension to get the IMEI from the device.
Aia Link: http://thunkablehelp.ml/div/aia/Point_Add.aia


#7

And yes I have tried all of these options, but I already have the necessary permission, the error only happens on the first startup before accepting the permission.


#8

Maybe you can try my extension ?


#9

I think the problem is not the extension, because before I was using CollinTreeIMEI and I had the same error, I think it’s something in the blocks.


#10

Really ? My IMEI is based on ColinTree’s, i have no issue with it, can you explain more ?


#11

Can you tell me the Android Version of the device you tested ? Or maybe showing your blocks ?


#12

Android 6.0

I use this extension to get the IMEI of the device to make a registration, when the app starts it shows the permissions that are necessary that the user accepts, and once you accept the permissions, under the permissions dialog already has a dialog showing the mistake. And in the next startup as the user has already accepted the permissions, the error no longer appears, there must be some block that is calling the action very early making this happen, well it’s what I think, just do not know which part of the blocks can be causing it…


#13

I have made available the EIA on which my project is based so you can add in the tk and see the blocks.


#14

Maybe you can test if permission error happens with my Demo APK ?


#15

No error appeared. That being said, I’m going to replace the extension I’m using with its extension and see if it will work. Soon I’ll say whether it worked or not.


#16

Did you created your app with Thunkable or Kodular ?


#17

In both, that’s why I created topics in both.


#18

IN Thunkable, it also happens ?


#19

Yes.


#20

I moved to your extension and the error keeps happening. Could you check the Aia blocks I sent up to see if it’s anything in the blocks?


#21

I’m using the TaifunTM extension to get the IMEI from the device.

did you try the example project downloadable from here https://puravidaapps.com/telephonymanager.php

Taifun