1

I am working with GoogleMaps v2 and tested my app in various android version (until 4.0. my application is working).

I tried to use my app on Asus Nexus 7 (4.4) but it does not work. Even the simplest mGoogleMap.setMyLocationEnabled(true); is not working though the map is displayed and zooming works.

I researched some asus nexus 7 problem but no one have the same problem as me.

Update :

I already figured out what's happening.

the mGoogleMap.setMyLocationEnabled(true);

is correct and IS working. the problem is, it is so slow. I have tried the default MAPS app in nexus and it has the same behavior.

so it's not a bug or something. It is just too slow. :)

CheeMa
  • 41
  • 1
  • 4

2 Answers2

2

i have the same problem and solved it by (( Go to Setting >> Locations> mode>> Battery savings >> then restart your device and set up again your app ))

Ayman Emad
  • 113
  • 3
  • 12
  • This works for me as well, but I'm wondering why "High Accuracy" doesn't work. The Nexus 7 does have a GPS module, so this should work out of the box I would think. – Bradford2000 Jul 30 '15 at 23:57
1

Google map now uses this to enable the My Location layer on the Map.

mMap.setMyLocationEnabled(true);

You can view the documentation for Google Maps Android API v2 here.

They're using Location Client now to Making Your App Location-Aware, you can also refer here for more information from these tutorial.

Stephen
  • 9,899
  • 16
  • 90
  • 137
user2817517
  • 43
  • 1
  • 7
  • yes, sorry, my code above is incorrect, it should be mMap.setMyLocationEnabled(true); yet it still doesn't run. here is my full code. public void init() { if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } SupportMapFragment fm = (SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map); if(mGoogleMap == null) { mGoogleMap = fm.getMap(); } if(mGoogleMap != null) { mGoogleMap.setMyLocationEnabled(true); } } – CheeMa Mar 20 '14 at 03:03