[FREE] DeviceUtils - To get some info about your device! 📱

New version 3 released ! :partying_face:

New blocks -

DeviceUtils.aix (6.5 KB)

(First post also updated)

2 Likes

Why I have Runtime Error...
Requires READ_PHONE_STATE:Neither user 10011 nor current process has android.permission.READ_PHONE_STATE.

-I have try block with and without AskForPermission
-I try on android 5.1.1

Thanks

@Ronald I think, this method is not supported on your device...


BTW, Are you using companion ? If yes, then try it in apk. If it doesn't work in apk also, then it means that this method is not supported on your device...

:slightly_frowning_face:

1 Like

I dont use companion... I use apk direct to my android...

Its OK If its not support to my android... Thanks...

2 Likes

Also, instead of READ_PHONE_STATE permission, try to ask for android.permission.READ_PRIVILEGED_PHONE_STATE because the GetImei and GetMeid blocks require that permission, and make sure its granted.
Also, do you even have a IMEI number ? :sweat_smile: (If you don't have a sim slot, more chance is there that your device has no IMEI number...)

Also, this link might help...
Deviceid function of the phone manager extension no longer returns the id.

2 Likes

Third-party apps installed from the Google Play Store cannot declare privileged permissions.
https://developer.android.com/about/versions/10/privacy/changes

See this Как получить id с android 10?

Also, An alternative for imei is discussed here:

2 Likes

Can you provide me the AIX file of this program?

Go to #post1 and click on versions

image

Please add KeepScreenOn block.

Already available here:

i know but i want in DeviceUtils.

@Bibek_Barman

I Hope that this is what you need?

no, i want KeepScreenOn option in DeviceUtils extension.

Why do you want that? This extension is only about giving device info. It doesn't make sense to add that block.

3 Likes

To control Brightness use

3 Likes

already have bluetooth enable or disable and status bar color change option.

And how to ask for READ_PRIVILEGED_PHONE_STATE from app inventor?

But how to do this from app inventor? I don't know about android Studio and the description given on this page is not related to app inventor.

AI2 is still targeting SDK 30 but will target SDK 31 in a few days. You will then have to manually change the targetSdkVersion (and set it to SDK 28) after decompiling the APK.

Note: This app will not be approved by Google in the Play Store.