Skip to content
Android portion of the ProximityBand wearable device project
Java HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

ProximityBand-Android

Connects with the Proximity Band over Bluetooth Low Energy to send and recieve data.

Usage:

Connecting to the Proximity Band:
Turn on the Proximity Band.
Wait for the LEDs to quickly flash.
Start the Proximity Band Andoid App.
If Bluetooth is not turned on, accept the prompt to turn it on.
Using the "Bluetooth LE Device" dropdown, select the Proximity Band device.
Tap the "CONNECT" button.
If successful, the button text will change to "DISCONNECT".
The app will attempt the automatically re-connect to the last connected device on the next launch.

Setting alarm settings:
Threshold slider: determines how low the signal strength must be for the alarm to activate.
Filtering slider: determines how smooth the filtered signal strength is.
Delay slider: determines how long the signal strength must remain below the threshold for the alarm to activate.

Setting the notification groups:
While the device is connected, notifications are forwarded to the Proximity Band.
Each notification can activate the red, green, or blue LEDs.
To choose which app's notifications will activate the red LED, tap on the red box under "Notification Groups" and select them from the list of all apps on the Android device.
Similarly, the same process is used for the green and blue notification groups.

Turning off the alarm:
In any case while the alarm is turned on, simply press the "Ok" or "Cancel" on the alarm dialog that pops up.

TODO:

See issues.

Technical details:

Getting data from the Proximity Band's Bluetooth LE:
Switch Position 1 Command  		=	"S1"
Switch Position 2 Command  		=	"S2"
Switch Position 3 Command  		=	"S3"

Button Pressed Command    		=	"B1"
Button Unpressed Command  		=	"B0"

Acknowledged Command                    =	'A'

Sending data to the Proximity Band's Bluetooth LE:
Red LED On Command         		=	'R'
Green LED On Command       		=	'G'
Blue LED On Command        		=	'B'
Red LED Off Command        		=	'r'
Green LED Off Command      		=	'g'
Blue LED Off Command       		=	'b'

Red LED Flash On Command    	        =       'I'
Green LED Flash On Command  	        =       'J'
Blue LED Flash On Command   	        =       'K'
Red LED Flash Off Command   	        =       'i'
Green LED Flash Off Command 	        =       'j'
Blue LED Flash Off Command  	        =       'k'

Motor Short Command      	 	=	'1'
Motor Medium Command     	 	=	'2'
Motor Long Command       	 	=	'3'

Alarm On Command           	 	=	'X'
Alarm Off Command           	        =    	'x'
Alarm Supress Command                   =	'Y'
You can’t perform that action at this time.