Skip to main content

ProGlove documentation

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

com.proglove.api.SET_DISPLAY_SCREEN_V2

-

Action that must be used so INSIGHT Mobile receives the Intent

yes

Extras

Extra Key

Extra Value Type

Extra Value Description

Mandatory (default value)

com.proglove.api.extra.SCREEN_ID

String

String to be used as a reference to the PgScreen

no (empty String)

com.proglove.api.extra.SCREEN_VIEWS

String JSON Array)

String that represents a JSON Array with up to three PgScreenViews, formatted per the StreamsAPI schema. For more details, see screen_views inside the display_v2 in the Streams API documentation.

yes

com.proglove.api.extra.ACTIVE_SCREEN_VIEW_ID

String

String that represents the initial PgScreenView to be shown.

no (first ScreenView from the list above)

com.proglove.api.extra.ACTION_BUTTONS

String (JSON Object)

String that represents a JSON Object of PgActionButtons, formatted per the StreamsAPI schema.

For more details, see action_buttons inside the display_v2 in the Streams API documentation.

no (no PgActionButton will be assigned)

com.proglove.api.extra.SCREEN_TIMER

String (JSON Object)

String that represents a JSON Object of PgScreenTimer, formatted per the StreamsAPI schema. For more details, see timer inside the display_v2 in the Streams API documentation.

no (no PgScreenTimer will be added)

com.proglove.api.extra.DISPLAY_FORCED_ORIENTATION

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:

  • LANDSCAPE

    • Forces the screen to display in landscape orientation

  • PORTRAIT

    • Forces the screen to display in portrait orientation

  • DEFAULT

    • Uses the device's default orientation setting

no (default orientation will be used)

com.proglove.api.extra.REPLACE_QUEUE

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

com.proglove.api.extra.SCREEN_ID

“SCREEN_1“

com.proglove.api.extra.SCREEN_VIEWS

“[{\"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\"}]”

com.proglove.api.extra.ACTIVE_SCREEN_VIEW_ID

“SCREEN_VIEW_1“

com.proglove.api.extra.ACTION_BUTTONS

“{\"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\"}}“

com.proglove.api.extra.SCREEN_TIMER

“{\"action_on_expire\":{\"click_on_component\":{\"ref_id\":\"CELL_1\"}},\"timeout\":1000”

com.proglove.api.extra.DISPLAY_FORCED_ORIENTATION

“PORTRAIT“

com.proglove.api.extra.REPLACE_QUEUE

false