Reason for these Run time error

Hello @R_J_ARUN_RAJ and welcome to the community!
Most probably this error comes when you try to get Device ID on Android 10 (Q) device because Android 10 restricted access to the following:

  • getDeviceId
  • getImei
  • getMeid
  • getSimSerialNumber
  • getSubscriberId
  • getSerial

All these blocks won’t work on Android 10 devices because the application needs this permission:
android.permission.READ_PRIVILEGED_PHONE_STATE
Which is granted to only apps signed with the platform key and privileged system apps.

Read more here:
https://source.android.com/devices/tech/config/device-identifiers
and here

2 Likes

So cannot solve this problem???

My app can run on my phone, but its not running other device. Runtime Error!!! Please solve it.

Welcome @sahin_caglar,
You are probably getting these errors on devices with Android 10 or heigher… See here why you can no longer access device identifiers starting from Android 10 :

P.S: next time please give more information and search the community:

4 Likes