Reputation: 904
I'm looking at trying to make my WP8 app more accurate in terms of location detection by making use of the accelerometer to detect if the device has stopped moving (in the context of driving, so horizontally only presumably).
I've read about the Motion API which is apparently the thing to use as it removes some of the complexity and calculations required when referencing the accelerometer directly. But i'm ensure has to how to use the data in the correct way, MotionReading.DeviceAcceleration etc.
Can anyone suggest the best/simplest way to determine if the device has stopped moving using this API or otherwise if there's a better way?
Thanks.
Upvotes: 0
Views: 351
Reputation: 1035
From my point of view, it really depends where do you want to use your app. If it is an outdoor application then as Igrali mentioned using GPS would be a better option. However, if you are still sure that you want to use accelerometer one way that I tried before was save last few results of the accelerometer every time then check them with previous results. if the result was same it means the system is stopped otherwise it is moving. That may not be a good way but it works.
Upvotes: 0