Thursday, September 1, 2016

Access raw accelerometer device

I have tried in vain to get a conventional Android java service running non-stop in the background. Sooner or later Android 'puts it to sleep'. I have an Alcatel Pixi 3 which I want to lock to my bike chain to detect motion on the chain (when someone tries to cut the chain) and notify me. It works for an hour or two but eventually moving the phone enclosure will not report to me any more. It seems this is to be expected from the way Android works - correct me if I'm wrong please.

I want to take a different approach now. I am a Unix systems programmer and have rooted the Pixi and am running Cyanogenmod. I have the ARMV7L C/C++ devkit on my PC and am at a point where i can cross-compile and push the apps to the Pixi now. So, I want to write the app in C/C++ and push it to the Pixi and register it in the /etc/init.d to be started on boot to get it running like a normal Unix server app without interference from Android's mechanics.

My question: Is there anywhere I can find the raw device specification to access the accelerometer ? Searching Google turned up nothing.

(i posted here as apparently i don't have enough reputation to post on the developers part and the site politely advised me to come and post here)


from xda-developers http://ift.tt/2c9m9sc
via IFTTT

No comments:

Post a Comment