Back to project page yousense-android-tracker.
The source code is released under:
Energy-efficent motion and location tracker for Android. Based on Mattias's power and tracking work. I plan to release it as GPL, once I have a paper published that goes with it. Might also release i...
If you think the Android project yousense-android-tracker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.linnap.locationtracker; //w w w . j a v a 2 s.c o m import android.util.Log; import com.linnap.locationtracker.gps.LocationFix; /** * Extend this class, and provide an instance in your extended SensorService.getBindings(). * @author ml421 * */ public class EventBindings { //// App infrastructure bindings /** * Call startForeground(your notification). * Useful if you don't want the service to be killed while the app is in the background. */ public void startForegroundWithNotification() {} /** * Log debug messages somewhere. Default implementation logs to LogCat. */ public void log(String message) { Log.i(SensorConfig.TAG, message); } /** * Log exception messages somewhere. Default implementation logs to LogCat. */ public void log(String message, Throwable throwable) { Log.e(SensorConfig.TAG, message, throwable); } // Events from location tracker /** * New GPS fix! Default implementation logs the coordinates. */ public void gpsFix(LocationFix fix) { log("Fix: " + fix); } /** * Some sensor start/stop event. Default implementation logs the event tag. */ public void event(String tag, Object extra) { if (extra != null) log("Event: " + tag + ", " + extra); else log("Event: " + tag); } }