Skip to content

Commit

Permalink
Sending anything said through the wearable
Browse files Browse the repository at this point in the history
  • Loading branch information
martincousido committed Apr 25, 2015
1 parent fdbfc99 commit c2dc506
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,10 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (!textMatchList.isEmpty()) {
// If first Match contains the 'search' word
// Then start web search.
if (textMatchList.get(0).contains("search")) {
String searchQuery = textMatchList.get(0);

String searchQuery = textMatchList.get(0);
Wearable.MessageApi.sendMessage(apiClient, remoteNodeId, COMMAND_PATH, searchQuery.getBytes());

searchQuery = searchQuery.replace("search","");
Intent search = new Intent(Intent.ACTION_WEB_SEARCH);
search.putExtra(SearchManager.QUERY, searchQuery);
startActivity(search);

Wearable.MessageApi.sendMessage(apiClient, remoteNodeId, COMMAND_PATH, command.getBytes());
}

}
//Result code for various error.
Expand Down

0 comments on commit c2dc506

Please sign in to comment.