MAI Intent integration - Intent specification
MAI can be integrated by utilising Intents to communicate with INSIGHT Mobile.
Note
No major changes were introduced in the production-ready Intent schema compared to the latest Beta version (except some minor StreamsAPI changes).
Intent compatibility with existing non-MAI specific features
All the existing Intent calls and events are supported for MAI as well (e.g., receiving barcode scans, double trigger, connecting the device, etc.). Refer to our official documentation for the basic Intent integration or any other non-MAI specific feature (e.g., trigger blocking).
Set MAI screen
In order to set a MAI screen, use the following specifications to create the Intent request.
Note
Most of the extra values are JSON Objects/Arrays that are formatted per the StreamsAPI schema.
Extra Keys/Action | Expected value | Comments | Mandatory | |
---|---|---|---|---|
Action | Action value | |||
| - | Action that must be used so INSIGHT Mobile receives the Intent | yes | |
Extras | Extra Key | Extra Value Type | Extra Value Description | Mandatory (default value) |
| String | String to be used as a reference to the | no (empty String) | |
| String JSON Array) | String that represents a JSON Array with up to three | yes | |
| String | String that represents the initial | no (first | |
| String (JSON Object) | String that represents a JSON Object of For more details, see | no (no | |
| String (JSON Object) | String that represents a JSON Object of | no (no | |
| String | String that indicates the screen orientation to enforced for the upcoming screen. This overrides the orientation for that screen only; all other screens will use the device's default orientation setting. Accepted values are:
| no (default orientation will be used) | |
| Boolean | Same as other non-MAI specific events. Used to replace all requests in the command queue that are waiting to be executed. | no |
Set MAI screen Intent extra example:
Extra Keys/Action | Value |
---|---|
| “SCREEN_1“ |
| “[{\"pg_work1_btn1_t1\":{\"button_1\":{\"action_on_click\":{\"basic\":\"NOTIFY\"},\"ref_id\":\"BUTTON_1\",\"text\":\"Button 1\"},\"field_top\":{\"input_method\":{\"num_pad\":{\"hint\":\"Mynumpad\",\"initial_value\":\"123\"}},\"ref_id\":\"CELL_1\",\"state\":{\"highlighted\":true,\"type\":\"FOCUSED\"},\"text_content\":\"Fieldtop\",\"text_header\":\"Header\"}},\"ref_id\":\"SCREEN_VIEW_1\"},{\"pg_work2_t1\":{\"field_bottom\":{\"input_method\":\"num_wheel\":\"initial_value\":123,\"title\":\"Mynumwheel\"}},\"text_content\":\"Fieldbottom\",\"text_header\":\"Header\"},\"field_top\": {\"text_content\":\"Fieldtop\",\"text_header\":\"Header\"}},\"ref_id\":\"SCREEN_VIEW_2\"},{\"pg_work2_t4\":{\"field_left\":{\"text_content\":\"Fieldleft\",\"text_header\":\"Header\"},\"field_right\":{\"text_content\":\"Fieldright\",\"text_header\":\"Header\"}},\"ref_id\":\"SCREEN_VIEW_3\"}]” |
| “SCREEN_VIEW_1“ |
| “{\"back_inside\":{\"action_on_single_click\":{\"basic\":\"NOTIFY\"},\"color\":\"GREEN\",\"ref_id\":\"PHY_BUTTON_BACK_INSIDE\",\"text\":\"Button 3\"},\"back_outside\":{\"action_on_single_click\":{\"basic\":\"NOTIFY\"},\"color\":\"ORANGE\",\"ref_id\":\"PHY_BUTTON_BACK_OUTSIDE\",\"text\":\"Button 4\"},\"front_inside\":{\"action_on_single_click\":{\"basic\":\"NOTIFY\"},\"color\":\"YELLOW\",\"ref_id\":\"PHY_BUTTON_FRONT_INSDE\",\"text\":\"Button 2\"},\"front_outside\":{\"action_on_single_click\":{\"basic\":\"NOTIFY\"},\"color\":\"BLUE\",\"ref_id\":\"PHY_BUTTON_FRONT_OUTSIDE\",\"text\":\"Button 1\"}}“ |
| “{\"action_on_expire\":{\"click_on_component\":{\"ref_id\":\"CELL_1\"}},\"timeout\":1000” |
| “PORTRAIT“ |
| false |