Skip to content

User Device Information #1915

@Marwan-Tm

Description

@Marwan-Tm

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:

  1. Add the extension to your project.

  2. Create a scene variable for any information you want to retrieve.

  3. Use the extension’s actions to detect device info (e.g. “Operating System Name → Store in Variable”).

  4. 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

Extension file

GDevelop-UserDeviceInformation-Extension-1_0_0.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions