[FREE] Device 💻 - Get device info!

nice update!

1 Like

Version 23!

New blocks:

IsAirplaneModeEnabled

image

Checks if the airplane mode of the device is on.

Returns: boolean

EDIT: Updated everything already.

9 Likes

Thank you so much for this wonderful extension @Gordon_Lu . I find many of these tools so valuable and IsAirplaneModeEnabled put some final touches on my app to make it better. Thank you much

4 Likes

Good update @Gordon_Lu!

2 Likes

Cool extension :+1:

2 Likes

2 posts were split to a new topic: How to create an application for the user to design the keyboard screen

I think this might work :

  public String version(){
    int osbv = android.os.Build.VERSION.SDK_INT;
    String[] avs = {"", "1.0", "1.1", "1.5", "1.6", "2.0", "2.0.1", "2.1", "2.2", "2.3", "2.3.3", "3.0", "3.1", "3.2", "4.0.1", "4.0.3", "4.1", "4.2", "4.3", "4.4", "4.4W", "5.0", "5.1", "6.0", "7.0", "7.1", "8.0.0", "8.1.0", "9", "10", "11", "12", "12L", "13"};
    try {
       return avs[osbv];
    } catch (ArrayIndexOutOfBoundsException e){}
    return "UNKNOWN";
    // @param (osbv => operating system build version)
    // @param (avs => android versions)
  }

It does the same thing as in your code, but in a compact way.

2 Likes

Hi @Gordon_Lu, when I implement the following procedure:

The outut appears as:

Brand and Model: Nokia TA-1032, Android Vesion: 9, Device Height and Width: 1280+720, Device External Storage: {Total: 7759302656, Used: 4920037376, Available: 2839265280}, Device Internal Storage: {Total: 10554699776, Used: 9244606464, Available: 1310093312}, User Location:

User location doesn't show and what is the unit of the storage?
Please help!

Bytes.

Did you allow the Companion to access your location?

Thanks

Yes

@Gordon_Lu?

Well it is working for me, as you can see in the previous post. I am figuring out why.

I used the location sensor latitudes and longitudes and got this runtime error:
image

It happened when I was once testing with the extension's latitudes and longitudes as well.

This checks if the coordinates are in OpenStreetMap API’s database. If it doesn’t exist, then such error would occur.

Sorry, I was testing on companion. Works on compiled APK

Definetily it's old, it runs android 2.1 :skull:. It may show the error because it's lower than the minimum api level.

2 Likes

Your extension is perfect!!

Hi Gordon, I'm trying to get Total Memory with this block, my result is 2.679 0.623

There is a mistake with the permissions in your extension:

@Gordon_Lu

I just noticed this by accident.

My bad. I'll update the extension accordingly.