I'm trying to get user's gps location when he submit a form (the form result is saved to a file so no need to internet connection), here is what I have tried :
1)Getting location updates (requesting update in 0 second a 0 second interval and 0 m distance) => takes too long (up to 5 minutes), if the user isn't connected to the internet, it will take forever.
2)Getting last known location, if it's not available (null), then try to get location updates => 95% of the times it's a null location (especially when I reinstall the app), and when I try to get the location updates I'm getting the same previous problem.
I can't figure out what I'm supposed to do, any help please? I'm using Google Play Services to get location. I'm open to all solutions.
Also I have noticed that when the connection is enabled it doesn't take too long (I'm using PRIORITY_LOW_POWER), but even in this case I'm not seeing any blinking gps icon on the notification bar, is this normal? (test on android 5.1.1).
Thank you.