In a mobile application, you want to check if the user's device is running on the Android operating system and provide Android-specific features and content. This process can be performed when the application is opened or when a button is triggered on a specific screen.
Adding an Action to Check the Android Operating System
- Enter the UI Design module and drag and drop a Button element from the Elements panel on the left side.
- In the Properties panel, enter a phrase such as ‘Android Check’ in the Label section of the button.
- Select the relevant button and add the OnClick → Device → Is Android action from the + ADD ACTION menu.
Configuring the Is Android Action
- This action has no parameters; when the action is executed, it determines whether the device is running the Android operating system.
- The action result is returned as a boolean (True/False).
- You can use this result to perform conditional operations or display different UI elements within the application.
- When the user clicks the ‘Android Control’ button, the Is Android action is triggered.
- If the action result is True, the application activates features optimised for Android devices (e.g., Android-specific notifications or settings).
- If the result is False, alternative content or an experience suitable for other platforms is presented.