0

i need help as soon as possible, right now, i have developed a app that must show current Location Client, and i have try http://developer.android.com/training/location/retrieve-current.html and its work well, but i want to show the client location without clicking the button, i have try to change the memthod getLocation(), but everytime i have tried to call method getLocation(), my app always error,

nb: i have removed the parameter of getLocation() and the xml i already change too. i have try to put the method in onCreated and also in onStart, it's error

anybody can help me please to solve my problem?

user2548784
  • 5
  • 1
  • 7
  • I think you are facing the same issue as I answered here: http://stackoverflow.com/questions/19825256/error-getting-location-android-gps-and-network/19825506#19825506 – cYrixmorten Dec 19 '13 at 08:03
  • i have try yours, but it's still not work, in the tutorial there getLocation(View v), in my project i have try to change it without parameter, but when i call the method in onCreated it give error, so how ican solve it, or can i add the code here so its clear – user2548784 Dec 19 '13 at 08:41
  • Yes please add your code. Seems odd for getLocation to take a View. By the way, my code does not handle zooming in to current location, you would have to do that in onLocationChanged using this method: http://stackoverflow.com/questions/14074129/google-maps-v2-set-both-my-location-and-zoom-in – cYrixmorten Dec 19 '13 at 08:58

1 Answers1

0

for Google map v2(the latest version),you should implements the LocationSource to update current location , than also you do need make a location request use LocationClient to get current location then update it with LocationSource.OnLocationChangedListener

eggcaker
  • 106
  • 1
  • 4