Sunday, April 28, 2013

Advantages and limitations of PhoneGap for sensor processing

This is my Droidcon Tunis 2013 presentation about the effect of the web application model on battery consumption.

Test programs related to the slideset are available here. You have to be logged into Sfonge website to access those.


Anonymous said...

Hi Gabor,

Thank you very much for the very informative power point slides. I'm considering creating an app actually using phone gap that senses when a user is in a traveling vehicle vs. walking/ exhibiting little motion (i.e. still).

I figured,because the following pattern seems to be true, I could use this as a basis for the discrimination:
- the instantaneous accelerations over a brief but not incredibly brief (like that that would be exhibited by a shake) would be much greater than those of a person in motion outside of a vehicle (eg. walking) [perhaps i have some of the logic of this wrong]
- moreover, its always matched by an equal integration of the deceleration... (but also maybe my math is wrong).

I was wondering if you think it would be possible to use phonegap to create a really basic app like this. I recognize your presentation was about the inapplicability of phonegap for applications requiring sensor usage like this :P, but I'm just curious if it is even possible to get some kind of reliable data from the accelerometer that would indicate travel in a vehicle vs. travel by foot/no motion.


Gabor Paller said...

Anonymous, there are two issues here:
- A moving vehicle generates relatively small acceleration. Simple human movements generate more which means that it is very hard to extract the acceleration caused by the vehicle from the noise.
- You can't really implement a background service in PhoneGap.