new Activities()
Handles relaying of information for web activities.
Handles relaying of information for web activities. Contains code to display the list of valid activities, and fires an event off when the user selects one.
- Source:
Methods
_listItems(choices) → {Array}
Formats and returns a list of activity choices.
Formats and returns a list of activity choices.
Parameters:
Name | Type | Description |
---|---|---|
choices |
Array | The list of activity choices. |
- Source:
Returns:
- Type
- Array
_sendEvent(value)
Sends an event to the platform when a user makes a choice or cancels the activity menu.
Sends an event to the platform when a user makes a choice or cancels the activity menu.
Parameters:
Name | Type | Description |
---|---|---|
value |
Number | The index of the selected activity. |
- Source:
cancel()
Cancels from the activity menu.
Cancels from the activity menu.
- Source:
choose(choice, setAsDefault)
The user chooses an activity from the activity menu.
The user chooses an activity from the activity menu.
Parameters:
Name | Type | Description |
---|---|---|
choice |
Number | The activity choice. |
setAsDefault |
Boolean | Should this be set as the default activity. |
- Source:
chooseActivity(detail)
Displays the activity menu if needed.
Displays the activity menu if needed. If there is only one option, the activity is automatically launched.
Parameters:
Name | Type | Description |
---|---|---|
detail |
Object | The activity choose event detail. |
- Source:
handleEvent(evt)
General event handler interface.
General event handler interface. Updates the overlay with as we receive load events.
Parameters:
Name | Type | Description |
---|---|---|
evt |
DOMEvent | The event. |
- Source: