I am trying to create an odometer based on GPC class.
Normally I draw the things like speed, altitude in Activity panels.
For odometer I need to read location constatly, if activity is on foreground or backgound and calculate by GPS method DistanceTo last location I was.
Then i just add distance to odometer.
What would be the best approach to achieve this ? Service ?
Simply said all i need is the odometer functionality to work even activity is not in foreground but still runnig, like somebody answers the phone but odometer should be still calculating values when on the phone.
Thansk for your help, I will share my source when i achieve this.
San
Normally I draw the things like speed, altitude in Activity panels.
For odometer I need to read location constatly, if activity is on foreground or backgound and calculate by GPS method DistanceTo last location I was.
Then i just add distance to odometer.
What would be the best approach to achieve this ? Service ?
Simply said all i need is the odometer functionality to work even activity is not in foreground but still runnig, like somebody answers the phone but odometer should be still calculating values when on the phone.
Thansk for your help, I will share my source when i achieve this.
San