Gps does not always return a location even it's available through FusedLocationProvider api or LocationManager LocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)
. Especially, if you are indoors it's less likely to get location from Gps depending on your device's Gps chip. Gps must be fixed to return a location.
You can write a test app which has LocationManager with Gps, Wifi and GpsStatusListener to check satellite count, satellites in the fix, and satellite signal strength and compare it with FusedLocationProvider at the same time and add the locations provided to map as markers. You can also look for Location.getExtras() for FLP which may contain info about satellites. Even if LocationManager Gps is available and satellite count is 2 i can not get a location from Gps.
Hello World in image should be Gps location but it's not returned since it's not fixed yet.
Testing may not solve your problem but you can compare situations you get location or you can not for example it may required to use 3 satellites to get location from Gps or minimum signal strength. It may also take too long for Gps to lock and status on GpsStatusListener
is set to GpsStatus.GPS_EVENT_FIRST_FIX
when it's locked. It took about 5 minutes for me Gps to get fixed and return a location. I also wrote another test with maps and i had the same issue until Gps is fixed on both LocationManager and FLP.