-
Notifications
You must be signed in to change notification settings - Fork 3
CentralHub
CentralHub is the app's MainActivity. When an SMS or Slack message is received by the SMSComIN or SlackService classes, they are sent to the NLP for decoding. The Natural Language Processor (NLP) then files back the response, which is reported to CentralHub that then allocates the appropriate activity or service that must be started while passing the necessary parameters as an intent. Moreover, the user can manually enter their command on this activity's main screen rather than messaging it. Once the user hits the SEND button, the command is sent to the NLP. This can also be repeated through speech.
This class is written entirely in Kotlin.
This method sets up the app's layout view. Furthermore, within it, the RobotController activity intent is declared. This method also checks for the presence of all the necessary permissions for the app to function without fail. To listen for any broadcasts from the NLP, the receiver is set up here.
This function sends the typed or spoken command to the NLP.
This is a local broadcast receiver receiving results from Natural Language Process service.
This function is for starting a robot controlling activity corresponding to intent "pickup".
- Parameters:
-
action
: the name of the action return from NLP server -
contact
: the contact info where the messages will be delivered
-