Android Question Android 10 Simcard library not working

walmo

Active Member
Licensed User
Longtime User
Using Simcard library to get subscriberId with the runtime PERMISSION_READ_PHONE_STATE.
It worked on all androids up to 9.
Must I get permision on something else , there no error in log. It just returns a null value for getsubscriberid.
Must i use another library.
Thanks
 

DonManfred

Expert
Licensed User
Longtime User

 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Note: If your app is the device or profile owner app, you need only the READ_PHONE_STATE permission to access non-resettable device identifiers, even if your app targets Android 10 or higher.

Make your app the deviceowner and it will work

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…