iFall: Fall Monitoring System API Docs
Disclaimer
This project is for research purposes only.
Not intended for use as a life saving device.
Florida State University is in no way responsible, liable, or accountable for this project.
Neither FSU nor the developers are responsible for misuse of this software.
These API's are also subject to change without notice.
Action |
Description |
Starting Service |
To start the iFallMonitoring Service via your application you must know the fully-qualified name given.
There are several ways to start the service, including the following. Remember to call startService from a Context.
Intent intent = new Intent(); intent.setComponent(new ComponentName("edu.fsu.cs.ifall", "edu.fsu.cs.ifall.ifall.iFallDetectionService")); ComponentName result = startService(intent); |
Stopping Service |
You must use the same method as starting. Remember to call stopService from a Context.
Intent intent = new Intent(); intent.setComponent(new ComponentName("edu.fsu.cs.ifall", "edu.fsu.cs.ifall.ifall.iFallDetectionService")); boolean result = stopService(intent); |
Reading StateChange |
The states must be transitioned incrementally in a forward fashion, while being able to return to the base state at any time.
The states are as followed: 0 - Base State 1 - Falling (LowerThreshold Broken) 2 - Hit Ground (UpperThreshold Broken) 3 - LongLie To receive the state you must register a broadcast receiver to listen for the string "ACTION_STATECHANGE" registerReceiver(yourStateReceiver, new IntentFilter("ACTION_STATECHANGE"));Once inside of your custom receiver, you can get the integert value of the "currentstate" by parsing the intent as follows public void onReceive(Context context, Intent intent) { int state = intent.getIntExtra("currentstate", -1); ... } |
Issuing Alert |
The iFallMonitoringService will broadcast an Alert when it wants to get the users attention. This alert will
prompt the user for feedback thus starting our alert process. See catch issuing alert register a receiver to
listen for the "alert.intent.action.ALERT" string.
registerReceiver(yourAlertReceiver, new IntentFilter("alert.intent.action.ALERT")); |
Canceling Alert |
A canceled alert is broadcasted if the AlertDialog has received positive feedback from the user and the
monitor is set to return to the base state. Look for the action string of "alert.intent.action.CANCEL".
registerReceiver(yourCancelReceiver, new IntentFilter("alert.intent.action.CANCEL")); |