tags:

views:

74

answers:

2

How to calculate the speed with which android mobile is moving, i.e user with mobile in his pocket/hand. Basically I would like to invoke some activity based on the user's speed, how will I calculate? based on what parameters in mobile. Thank you.

+2  A: 

Get two GPS fixes and measure the distance/time between them.

CommonsWare
A: 

You can check MyTracks's src code. They do exactly what you want.

Macarse
I am not able to figure out ..where exactly is the speed calculation part of it . Can you guide me. thanks
check this: http://code.google.com/p/mytracks/source/browse/MyTracks/src/com/google/android/apps/mytracks/stats/TripStatistics.java
Macarse