You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add action types and STK to docs
Added info about action types for USSD push and variable longstring. Added more info about STK and especially the expected text field for STK number choices
* Add Press OK step to quickstart
* Update ussd.md
Replace depreciated extra
* Replace depreciated extra
* Add input_extras to session result fields
* update extras fields in result
Copy file name to clipboardExpand all lines: actions.md
+34-7Lines changed: 34 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -12,27 +12,48 @@ Actions can be updated anytime from within your Hover dashboard so that you do n
12
12
###### Actions consist of
13
13
14
14
-**Name** of your choice, for example "Send Money".
15
-
-**Mobile networks**/SIM cards that can run the USSD service.
16
-
-**Root code**, the shortcode used to dial the USSD service.
17
-
- The USSD menu **steps**. See below.
15
+
-**Description** optional, for your internal use on the dashboard. Anything to help your team know what the action is for.
16
+
-**Mobile networks**/SIM cards that can run the service.
17
+
-**Type**: USSD, SIM Toolkit, USSD push, or variable longstring. See below.
18
+
-**Root code**, the shortcode used to start the session.
19
+
- The menu **steps**. See below.
18
20
19
21
<divclass="call-out call-out-info">
20
22
<p>See our <a target="_blank" href="https://medium.com/use-hover/45aa9dd9dfa">blog post</a> for more on converting USSD menus into actions.</p>
21
23
</div>
22
24
23
25
#### Creating an Action
24
26
25
-
Log into your Hover account and choose “New Action” from the dashboard. Give the action a memorable name. We recommend using the operator name and the type of action for easy reference (eg Tigo Send Money). Then choose the country and mobile operator your action will work with. If you’d like to support the same USSD function across multiple networks, you will need to create a unique action for each operator (eg Tigo Check Balance, MTN Check Balance) if the USSD root code and steps are different.
27
+
Log into your Hover account and choose “New Action” from the dashboard. Give the action a memorable name. We recommend using the operator name and the type of action for easy reference (eg Tigo Send Money). Then choose the country and mobile operator your action will work with. If you’d like to support the same function across multiple networks, you will need to create a unique action for each operator (eg Tigo Check Balance, MTN Check Balance) if the USSD root code and steps are different.
28
+
29
+
Choose the **type** of menu that you are integrating. There are four types:
30
+
31
+
1.###### USSD
32
+
33
+
A standard USSD menu that is started by dialing a shortcode and then entering choices in the menus
34
+
35
+
2.###### SIM Toolkit
36
+
37
+
A SIM Toolkit (STK) based menu. Primarily for Safaricom MPESA in Kenya, but there are others.
38
+
39
+
3.###### USSD or STK push
40
+
41
+
A session that is not started by dialing a shortcode or launching the STK but is instead started by an API call. Most commonly used to enter a PIN to confirm, but there can be as many steps as needed, just like a regular USSD action.
42
+
43
+
4.###### Variable Longstring
44
+
45
+
A USSD session that does not have menus for some choices that need to be made. For example, an airtime top-up using a scratch card might be done by dialing \*123#voucherCode\* where voucherCode is the number from the scratch card.
46
+
26
47
27
48
In **root code** enter the string a user would dial to initiate the session. These usually look like \*123# or \*123\*01#.
28
49
29
-
Finally enter the **steps** for your action. Each step corresponds to a selection from a USSD menu. There are three types of steps:
50
+
Finally enter the **steps** for your action. Each step corresponds to a selection from a menu:
30
51
31
52
1.###### Number
32
53
33
54
Constant choices such as entering “1” to reach My Account.
34
55
35
-
Corresponds to the user entering a number from a list of options and pressing “Send”. The ‘Input’ is the number Hover’s SDK will enter on behalf of the user. If there is a confirmation dialog without a number choice, create a number step with the value of a single dash `-`. This is ONLY required for dialogs in-between other steps, not at the end of the session.
56
+
Corresponds to the user entering a number from a list of options and pressing “Send”. The ‘Input’ is the number Hover’s SDK will enter on behalf of the user. For SIM Toolkit actions, the number is indexed from 0, meaning the first option is 0, the second is 1 and so forth. Additionally STK number steps have an additional field "expected text". You must enter the exact (case-insensitive) text of the menu option. This allows Hover to counteract some of the bugginess of the Android STK and error correct to find the right choice.
36
57
37
58
2.###### Variable
38
59
@@ -46,6 +67,12 @@ Finally enter the **steps** for your action. Each step corresponds to a selectio
46
67
47
68
PIN steps enter the user's PIN during the session. When running an action that contains a PIN step, Hover's SDK will display a secure prompt to the user before starting the session. The PIN is encrypted and temporarily stored using the Android Keystore, entered into the session at the appropriate time and then deleted. Note: The PIN **never** leaves the device.
48
69
70
+
4.###### Press OK (no choice)
71
+
72
+
Press the confirm button - it usually says OK or Send, but this will press it regardless of the actual text.
73
+
74
+
This is used for dialogs that don't have any sort of entry or choices but are just confirmation. It is rare that you will actually need to use this: in most cases Hover confirms automatically after an entry is made or at the end of the session. This is only for cases where a confirmation needs to be made in the middle of the session.
@@ -69,4 +96,4 @@ You must get the `READ_PHONE_STATE` permission and call `Hover.initialize()` bef
69
96
70
97
If you want to know if you can run a particular action on the user's SIM(s) you can call `Hover.isActionSimPresent(actionId, context);`. If you want to get a list of all your actions that will run on any of a user's present SIM cards you can call `Hover.getAllValidActions(context);` which will return a list of actions. There are also helpers for getting all the SIM cards present and for presenting a SIM choice interface to the user.
Copy file name to clipboardExpand all lines: ussd.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -45,12 +45,18 @@ String
45
45
46
46
The action name you provided for the action
47
47
48
-
`ussd_messages`
48
+
`session_messages`
49
49
50
50
String\[\]
51
51
52
52
Text of each USSD response in order
53
53
54
+
`input_extras`
55
+
56
+
Hashmap
57
+
58
+
The key/value extras that you provided when starting the action
59
+
54
60
`request_timestamp`
55
61
56
62
long
@@ -77,4 +83,4 @@ If you do not have access to the SIM card or network you wish your users to use
77
83
78
84
If your USSD session does not seem to be running correctly and you want more visibility into what is happening you can activate the SDK debug environment by calling `.setEnvironment(HoverParameters.DEBUG_ENV)` on your `HoverParameters.Builder()`. This will prevent the Screen Blocker from displaying, allowing you to see the USSD session as it happens, and adding more logging information to the logcat. Do not interact with the session when you see it in this mode; if nothing happens you should recheck your action configuration. If it still doesn't work it is most likely a device specific issue, try with a different device and contact us so we can check the device and help you out. Please do not run debug mode in production: when users see the USSD messages flash across the screen it scares them, the blocking processing screen should always be in place.
0 commit comments