I have an issue with huawei devices and all devices without google play services What should I do if I want to get user location from these devices?
Asked
Active
Viewed 348 times
-1
-
1The gps chip gives does not give info without those services? Hard to believe. – blackapps Feb 17 '22 at 08:56
-
Can you describe the issue in more detail than "not working"? What happens? – Ryan M Feb 18 '22 at 23:40
1 Answers
1
You can use LocationManager with GPS or NETWORK provider.
LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);
Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
Reference: get location without google play services -android

Min Thura
- 21
- 2