+3 votes

Hey guys, I want to check the manufacturer of the device (For example: Samsung, Sony, etc.) and the version of the operating system of the device (For example: 4.0.4). I also need to check when the game is sent to the background (For example: When someone opens the browser without first closing the game). Does anyone know of an easy way to do these things in Godot?

in Engine by (18 points)

hello there, i believe you should write a module for it. Write the android java code then compile godot with your module.

Hey =D
I'll probably have to do this. But as there are some similar functions already implemented such as, for example, OS.get_unique_ID() and as the documentation is a bit outdated maybe there was something, not yet documented, to know the android version without needing a whole new module just for this, since it is a very simple thing...

for only android, yes, it's very simple thing.
but Godot engine supports many platforms.
if engine supports these function, it should be functional for as many platforms as possible.
that's not simple thing...

1 Answer

0 votes

Information about manufacturer can be extracted from OS.get_model_name().

Information about sending to background is supposed to be handled by:

func _notification(what):
    if (what == MainLoop.NOTIFICATION_WM_FOCUS_OUT):
by (675 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.