Mobile Actions
The Mobile Action element enables you to use mobile features within the application.
Drag and drop the activity ‘Mobile Action’ underneath Action into the drawing area.
Currently, there are 15 different actions implemented in Simplifier. Use the input/output mapping to define the source for the input (request) and the destination for its output (response).
The mobile actions are grouped into the following categories:
Background Mode
If the background mode is enabled, Simplifier Business Apps will be executed even if the app is running in the background or the display is locked. The Background Mode is enabled per Default – even you don’t use the mobile action explicit.
Default Value: enabled
Light
With this mobile action, your mobile device can switch on/off the camera light.
Screen Orientation
You can set and lock the screen orientation of the mobile device. Possible values are Landscape, Portrait, Landscape (Primary), Landscape (Secondary), Portrait (Primary), Portrait (Secondary) and Unlock.
Show Notification
This mobile action will trigger a native notification on the mobile operating system (android/ios).
Show Toast
This mobile action will show a native toast, with a constant or by using the input mapping. You can specify the duration how long the toast should be displayed (Short or Long) and the position (Top, Center or Bottom).
Vibrate
Define how many milliseconds the mobile device should vibrate.
NFC Read
Enables devices to read NFC tags.
NFC Write
This action allows you to write to NFC tags.
Download File
This action allows you to download a file (e.g. a video file). The parameter targetDirectory has two possible values: Cache and Data. The Cache option will result in saving the file in a cache directory which can be emptied by the operation system. On the other hand the Data option can not be emptied by the operation system.
Upload File
This action allows you to upload a file to a server. As HTTP methods POST and PUT are available. The parameter fileName determines the name which the file will have on the server after upload.
Acquire GPS
The mobile action GPS need to be initialized at first. It’s recommended to do this in a screen onInit function. After executing the Mobile Action the GPS data (Longitude and Latitude) can be accessed using the Auto Field Geolocation.
Capture Audio
This Mobile Action allows to record an audio file (e.g. Voice Memos) using the microphone of the device. The parameter limit is the maximum recording time in seconds. The value 0 results in an unlimited recording time.
Capture Image
There is the Mobile Action Capture Image which gives the application builder the possibility to capture an image using the camera of the device. The parameter useInternalCameraApp enforces the usage of the camera application which is included in Simplifier Mobile Client as descriped here. To capture multiple images in a row set the parameter limit to the number of images which are needed.
Capture Video
This Mobile Action allows to capture a video using the camera and microphone of the device. The parameter useInternalCameraApp enforces the usage of the camera application which is included in Simplifier Mobile Client as described here. To record multiple videos in a row you can use the parameter limit. The duration parameter limits the maximum time of recording in seconds. The value 0 results in an unlimited recording session. The parameter quality can have the value 0 and 1. The value 1 results in using a high quality profile for recording and 0 stands for a low quality recording profile.
Play Audio
The Mobile Action Play Audio lets you play a audio file. Just the parameter path is required which awaits a file path or an URL of an audio file.
Play Video
By providing the Mobile Action a path to a video, it will play the video in a full-screen mode.
Scan Barcode
Set the format of the code you want to scan, the orientation of the camera and write a text in the prompt property.
Scan Meter
Parameter | Data Type | Valid Values |
Meter appearance | String | see table below |
Number of counts | Integer | 1, 2 (from the dropdown) |
Integer digits | Integer/String | AUTO, 1-n |
Fraction digits | Integer/String | AUTO, 1-n |
You can choose from the following values for meter appearance:
Key | Value |
mechanical_black | White text on black rollers |
mechanical_white | Black text on white rollers |
lcd | LCD Display |
lcd_edl21 | EDL21 and similar meters with LCD 7 (three-digit OBIS code to the left) |
For the output mapping you can use the following parameter:
Parameter | Data Type | Description |
image | string | Image of the scanning process as data URL |
line1 | string | Result of scanning the first counter (always set) |
line2 | string | Result of scanning the second counter (only set if 2 counters were scanned) |
line1ObisCode | string | Result of scanning the first counter’s OBIS code (only set if meter appearance was set to lcd_edl21) |
line2ObisCode | string | Result of scanning the second counter’s OBIS code (only set meter appearance was set to lcd_edl21 and 2 counters were scanned) |
Text to Speech
With this mobile action, you can specify a text to be read out, as well as the output language. You can choose between English (US) and German (DE).
Speech to Text
With this mobile action, your mobile device converts human speech into text. You can choose between English (US) and German (DE) for the spoken language. Furthermore you can show a prompt with a custom message.