• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

System Check for Android target (get info about OS)

grant

Member
CX Code Contributor
3rd Party Module Dev
3rd Party Tool Dev
Joined
Nov 19, 2019
Messages
80
This module gets you access to some info about the system on Android.

canOpenUrl:Bool(url:String)
Returns if the specified URL can be opened by any installed apps. Sometimes no web browser is installed and it's just good to check before opening anything.​
checkSystemFeature:Bool(feature:String)
Returns if the device has the specified feature. EX: "android.hardware.screen.portrait"​
shouldUseTelevisionUI:Bool()
Returns if the device is in the TV mode. On TV top boxes it should always return true.​
nightModeTheme:Bool()
Returns if the device is in night mode, so apps can use a dark theme and whatever.​
userLanguage:String()
Returns the users chosen language's name (3 characters long) as a string.​
osVersion:Int()
Returns the API level of the system. EX: Android 10 = 29​
developerModeEnabled:Bool()
Returns if the device has developer mode activated.​
hasPermission:Bool(permission:String)
Returns if the specied permission has been granted by the system.​

More functions may be added later. It is all only implemented in Android. Maybe GLFW and HTML will get some functions later.

The first of many modules I plan on making.

Demo: The included demo.cxs prints all the function results into the log.

Install: extract the zip file inside the modules_ext folder inside your Cerberus X installation folder. Rename the resulting folder to systemcheck.

License: zlib/libpng (see included license.txt)
 

Attachments

  • System-Check-module-V1.0-for-Cerberus-X-for-Android.zip
    2.9 KB · Views: 88
Back
Top Bottom