Tunnel Intents over bluetooth
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
AndroidTunnel
BluetoothLib
Common
GlassTunnel
IntentTunnel
MusicPusherSample
.gitattributes
.gitignore
Glass-IntentTunnel.iml
LICENSE.md
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle
web_hi_res_512.png

README.md

Glass-IntentTunnel

Very unpolished at this point, but proof of concept is working.

Tunnel Intents over bluetooth.
The idea is to have a service app on Glass and the Phone that would handle traffic using intents. No need for every app developer to write bluetooth connection code. Developers can simply send intents to the service to have them broadcast on the other side of the bluetooth connection.

While, I initially made this for Phone to Glass communication, this tool will work from Phone to Phone as well.

Install Instructions

  1. Download the APK here. The same APK is for the phone and Glass

  2. Intall the APK on you Phone and run IntentTunnel. Press menu and choose Select BT Device. Then select your Glass BT Device from the list. Press Menu again and select Start to start the router (If it's not already started)

  3. Intall the APK on Glass using this command: adb install -r IntentTunnel-debug-unaligned.apk

  4. After installing the APK on Glass, start IntentTunnel on Glass usng Glass Launcher, Launchy, or using this command adb: adb shell am start -n com.masterbaron.intenttunnel/com.masterbaron.intenttunnel.IntentTunnelActivity

  5. Select: Select BT Device from the menu. Then select your Phone BT Device from the menu choices. Select Start to start the router (If it's not already started)

Thanks to https://github.com/KTlab/BluetoothCommunicationLibrary_Android for providing a solid bluetooth library to work off of.

Features:

  • Stays disconnected until needed.
  • Stays connected for 30 seconds after last message is sent incase there is a flurry of traffic.
  • Remaining bound to the router servvice will keep the connection open until all binds to the service are disconnected. Use this if the 30 seconds is too low of a timeout.
  • Either side can initiate a message and start a bluetooth connection.
  • uses pings to ensure connection is actually working.
  • Intents are converted to strings using intent.toUri()
  • Added support to also include byte[], string list, and integer list.

SAMPLE:

Install MusicPusherSample on Glass. Say "phome music start" or "phone music stop". The MusicPusherSample sends "com.android.music.musicservicecommand" intents to the service to have them broadcasted on the phone. Most music players on the phone respond to these intent allowing control of them.

Change Log:

0.0.1: Initial Release