[FREE] Device 💻 - Get device info!

Yeah, you are 33% right, but Google's documentation said,

Do not assume that its value has any particular structure or that values of RELEASE from different releases can be somehow ordered.

So it might return 1.0, bananas or 3.4b5.

3 Likes

Version 9!

Still, big thanks to @oseamiya .

Updates:

  1. Changed all Megabytes to Bytes because I discovered a number loss during the conversion.
1 Megabyte = 1024 * 1024 Bytes

Methods

ApplicationName

image

Returns the application name from the given package name, else returns the notFound value.

Returns: text

Parameters: packageName = text, notFound = text

DisplayRefreshRate

image

Returns the refresh rate of the display in frames per second.

Returns: number (float)

DisplayRotation

image

Returns the rotation of the screen from its "natural" orientation. The returned value may be Surface.ROTATION_0 (no rotation), Surface.ROTATION_90 , Surface.ROTATION_180 , or Surface.ROTATION_270 . For example, if a device has a naturally tall screen, and the user has turned it on its side to go into a landscape orientation, the value returned here may be either Surface.ROTATION_90 or Surface.ROTATION_270 depending on the direction it was turned. The angle is the rotation of the drawn graphics on the screen, which is the opposite direction of the physical rotation of the device.

Returns: number (int)

ExternalStorageAvailable

image

Returns the available storage size in bytes.

Returns: number (long)

ExternalStorageTotal

image

Returns the total amount of external storage in bytes.

Returns: number (long)

ExternalStorageUsed

image

Returns the used amount of external storage in bytes.

Returns: number (long)

SensorAmount

image

Returns the total amount of sensors on the device.

Returns: number (int)

SensorList

image

Returns a list of all sensors on the device.

Note: I will NOT show the Do-It for this block because the Do-It is way too much. Here is an example of what result it will return:

[
{
 Sensor name="Proximity Sensor", 
 vendor="xiaomi Inc.", 
 version=1,
 type=8,
 maxRange=5.0,
 resolution=1.0,
 power=0.012,
 minDelay=200000
 }, 

{
 Sensor name="icm4x6xx Accelerometer Non-wakeup",
 vendor="TDK-Invensense",
 version=307,
 type=1,
 maxRange=156.9064,
 resolution=0.0047884034,
 power=0.24,
 minDelay=2000
 },

{
 Sensor name="ak0991x Magnetometer Non-wakeup",
 vendor="akm",
 version=146970,
 type=2,
 maxRange=4911.994,
 resolution=0.15,
 power=1.1,
 minDelay=10000
 }
]
4 Likes

@gordonlu310 could you edit the version and new blocks in the first post?
you just put the do it images

Ok sure I will do it now.

My website is edited with the latest version, click here.

2 Likes

Thanks
The new blocks and the megabytes to bytes is changed but not the version code

should be

Version: 9

It was changed. Did you refresh the topic?

I didn't said it's not changed

just said the version code is not changed (but it changed now)

1 Like

But still I REALY like this extension! :heart: :heart:

1 Like

Version 10 AGAIN!

As usual, thanks to @oseamiya.

Special thanks to my classmates Charmaine and Hayson.

InternalMemoryAvailable

image

Returns the available internal memory in bytes.

Returns: number (long)

InternalMemoryTotal

image

Returns the total internal memory size in bytes.

Returns: number (long)

InternalMemoryUsed

image

Returns the used internal memory size in bytes.

Returns: number (long)

KernalVersion

image

Returns the Kernel version of the device.

Returns: string

3 Likes

you are updating this extension VERY fast and well! nice work!
lf you continue, this will happen:

and this will be the best extension after the Rubik's cube extension!

4 Likes

Update = Appinventor.Extensions.Updates.Device.Feedback(Feedback.CoolUpdate);

Cool Update!

1 Like

Deep cool update

But block should be 'KernelVersion' not 'KernalVersion'

1 Like

Version 11

Fixed KernelVersion typo mistake.

IsEmailAddressValid

image

Tests if the email address is valid.

Returns: boolean

Parameters: emailAddress = text

In case you're wondering, this has something to do with the user's device. When you are verifying an email from the user's device in a login app, you can use this.

3 Likes

Version 12

VersionCodeFrom

image

Returns the version code from the package name. In case an error occurs, the notFound value is returned.

Returns: number (int)

Parameters: packageName = text, notFound = text

VersionNameFrom

image

Returns the version name of an app from the package name. In case an error occurs, the notFound value is returned.

Returns: number (int)

Parameters: packageName = text, notFound = text

1 Like

the image is wrong

and there are two version 12! posts

Sorry, the internet was a bit laggy, editing error...

1 Like

It is fine :blush:

Posts updated, thank you.

1 Like