Similar questions may arise in this matter, but I need your thoughts and suggestions on some specific requirements.
Here is my need - We are developing one application that tracks the user's trip. The application will begin collecting this user's location in the background. When the user "Starts" his trip from the App.Background Service will receive seats based on the user's movement at a certain time. When the user “stops” his trip from the application, we calculate the distance traveled by the user using all the recorded locations (using the Google’s distance calculation API). The application works great in an ideal case. But the main task - In some scenarios, we cannot get the exact and exact location of the User. The scenarios that affect this - there is no Internet, data plan with 2g / 3g, some specific areas where GPS does not return accurate data, etc.
Incorrect lat-long data leads to incorrect trip distance and route. The main problem with the application.
Please can anyone suggest a better alternative / suggestion for this? PS - We tried GPS, Network, FusedLocationProvider.
EDIT 2 -
We implemented logic based on accuracy and distance. Closer to the points. And I just stumbled upon one useful api from Google that fixes some location points that are distracted from real roads. The publication here is for reference by others ...
Snap to Api Roads from Google
android android-location android-fusedlocation android-gps
Aditi parikh
source share