I have implemented an application in Android. There are three components: MainActivity, MyWorker and PublishService. MyWorker takes sensor's data from Android's SensorManager then broadcasts to MainActivity. When MainActivity obtains message, It will call a publish function in order to push it to my PublishService. Please see following diagram: I have implemented an application in Android. T