-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Description
User Device Information Extension
A simple yet useful extension that allows you to retrieve various information about the user's device, such as:
• Operating system name
• Battery level and charging status
• Browser type
• Network connection details
• Language and country
• Time, date, timezone
• Screen size, orientation, and more
The extension stores the result in a scene variable or a temporary (discarded) variable of your choice.
If you find that the variable's value after the action is "?" or "0", or if you notice that the value hasn't changed, this means it was not able to detect or determine it.
Warning: Some values may not be 100% accurate due to browser or device limitations.
Notes:
• Use Boolean variables (not text) when storing true/false values.
• Some commands may rely on modern browser APIs and might not work on older browsers or certain platforms.
• Async-based actions (like battery/microphone check) may take a short moment to complete.
• Make sure the scene is loaded before calling these actions to avoid unexpected results.
How to use the extension
Using the extension is simple:
-
Add the extension to your project.
-
Create a scene variable for any information you want to retrieve.
-
Use the extension’s actions to detect device info (e.g. “Operating System Name → Store in Variable”).
-
Read the variable in your events and build your logic around it.
Example:
If device type = “Mobile” → switch to mobile layout
If battery level < 20 → show warning
If dark mode = True → change theme
Most actions work instantly, and some (like battery/microphone check) may take a moment depending on browser permissions.
Checklist
- I've followed all of the best practices.
- I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
- I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.
Example file
GDevelop-UserDeviceInformation-Extension-1_0_0.json