How to set screens
There are two types of screens (templates): Notification screens and permanent screens.
Notifications, unlike permanent screens, are only visible for a set period of time.
After that time, an automatic transition to the previous screen takes place.
The notification display can only be interrupted and finished early by a new screen setting command, either a notification or a permanent message.
setScreen commands, like all commands that trigger an action on a MARK, are queued in Insight Mobile by default.
By providing a boolean valued extra
com.proglove.api.extra.REPLACE_QUEUE or a special flag in
PgCommandParams, this behavior can be changed to replace the queue with this new command.
To learn more, see Queueing Behavior.
To set a screen using SDK you need to provide the following data:
|Parameter Name||Data Type||Description|
|templateId||String||The ID of the selected template|
|templateFields||Array<PgTemplateField>||The selected fields in the given template|
|refreshType||RefreshType||The refresh type used for the screen update|
|(optional) durationMs||Int > 0||If this is provided, a notification screen will be set for this time|
|callback||IPgSetScreenCallback||The object which will be called back with the results|
For Intent, the data is almost identical in content, but structurally different:
|Extra Name||Data Type||Description|
||String||The ID of the selected template|
||String||The selected header and content data in the given template|
||String||Needed to parse the DATA correctly|
||String||The refresh type used for this screen update|
||Int > 0||If this is provided, a notification screen will be set for this time|