I'm trying to figure out how best to control an accelerometer sensor with a polling rate of less than 0.25 milliseconds. I have implemented a user interface parameter so that the user can switch to a constant monitoring state and save him from the consequences of a battery leak. Will the remote service work best on the daemon thread due to how Android handles memory and thread cleanup? The bottom line is to control the accelerometer as close to the maximum battery capacity as possible. And this monitoring should be long, maybe even more than 24 hours in a row, again I understand the consequences of energy consumption. Any suggested snippets or snippets of code will be appreciated.
Just newbe is looking for advice from the wisdom of the Android community. Thanks in advance,
-Steve
COMPLETION: I am trying to detect the moment when a change in acceleration occurs. My code distinguishes between the axis, but getting real-time data from the accelerometer is my goal.
android multithreading daemon
Kingsolmn
source share