Skip to content

Commit

Permalink
Merge pull request #1 from Juandesi/adding-voice-input
Browse files Browse the repository at this point in the history
Adding voice input
  • Loading branch information
Juan Desimoni committed Apr 25, 2015
2 parents 94ab7de + c2dc506 commit edf52ae
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 295 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
hs_err_pid*

# IDE
local.properties
*.iml
.idea/
.gradle/
Expand Down
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# Wearable Message Api Example
# Wear Voice to Phone

The example of using Android Wearable Message Api to exchange messages between mobile and wearable applications.
This apps make possible to consume voice input from an Android Wearable Device and send the message to a mobile application for later processing.

## Project.
You can open this project directly from Android Studio.

The project contains two applications:
* Wear App
* Mobile App

## Use

* Open the wear app and the mobile app
* Send Voice Messages from the wear device.
* See the result in your phone where the mobile app is running.
* Done :D

## Contents
* Creating Wearable Message,
* Sending Wearable Message,
* Listening for Wearable Messages using Wearable MessageListener.

The example includes:
- Creating Wearable Message,
- Sending Wearable Message,
- Listening for Wearable Messages using Wearable MessageListener.
11 changes: 0 additions & 11 deletions local.properties

This file was deleted.

94 changes: 0 additions & 94 deletions mobile/mobile.iml

This file was deleted.

9 changes: 9 additions & 0 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">

<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

<activity android:name=".MobileActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -31,5 +36,9 @@
</application>


<uses-sdk android:minSdkVersion="18"
android:targetSdkVersion="21" />

<uses-feature android:name="android.hardware.camera" android:required="false" />

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,19 @@
import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.wearable.MessageApi;
import com.google.android.gms.wearable.MessageEvent;
import com.google.android.gms.wearable.Node;
import com.google.android.gms.wearable.NodeApi;
import com.google.android.gms.wearable.Wearable;

import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.StatusLine;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

public class MobileActivity extends Activity {
Expand Down
Loading

0 comments on commit edf52ae

Please sign in to comment.