i wrote an app, that tracks the gps location while jogging. Unfortunately the app needs some time to get a gps signal. When i open other apps like google maps, they are getting immediately the position.
My Problem is: How to implement the gps-provider, so that the app gets as fast as possible a signal.
One idea was, to start a service with the app, so that the provider does some preliminary work. But the tracking-activity is not the main-activity. How can i bind the service in an activity, that does not have started the service? Is this a good idea?
Thanks for reading - and i hope my english is understandable,
Martini
As I mentioned in my comments, GPS start up is not an instant process. The receiver basically has to know the position of each of the GPS satellites in the constellation in order to calculate it's location. The ephemeris data describes the positions of the satellites to the received and is downloaded from the satellites when the GPS is turned on (and I almost forgot to mention the almanac data, which is also part of the download and describes the orbits of the satellites). Things like downloading from multiple satellites and using the last known position can help speed up this initial process, but you cannot make it "instant".
There are other strategies that can be used to help speed up the location process, especially in cell phones. In addition to the last-known position, things like Cell Tower + Timing positioning (ECID) or Wi-Fi positioning can be used in place of GPS while the GPS is still in the acquisition process.
This link describes some ideas on how to handle locating a mobile phone in android, but the short of it is:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With