To run the Action Invoker from another Android application, create an
Intent and then add
extras to the Intent, including:
- ACTION: The JSON specification of actions. This string is required, and contains a single action specified as an object, or multiple actions specified as an array of objects. For more information about how to specify actions using JSON, read Action Invoker Execution Using JSON.
- TITLE: This string is displayed by CSEntry when running the actions. The title is optional.
- ACCESS_TOKEN: This string contains an access token that provides permission to use the Action Invoker. The access token is optional, and if not provided, CSPro will ask the user to approve the external caller's request to access CSPro functionality and data.
- REFRESH_TOKEN: This optional string contains a refresh token received from the Action Invoker that, once a user has approved access to the Action Invoker, allows repeated use without an access token for a period of time.
- ABORT_ON_EXCEPTION: This boolean indicates whether the Action Invoker should abort upon an exception occurring. This value is optional and defaults to true. This setting applies only when the JSON specified in ACTION contains multiple actions.
- Package: "gov.census.cspro.csentry"
- Class: "gov.census.cspro.ActionInvokerActivity"
The result comes with two extras:
- RESULT: A string containing the result of the action or actions, in the format described on the Action Invoker Execution Using JSON page.
- REFRESH_TOKEN: If the user approved access to the Action Invoker, a refresh token string is provided. This refresh token can be used to call back into the Action Invoker without needing the user to approve access multiple times. This refresh token is valid for one hour.
When the Action Invoker returns a refresh token, you will want to use it when calling back into the Action Invoker. The purpose of this refresh token is so that you can call into the Action Invoker multiple times without multiple requests for approval providing a suboptimal experience for the user.