0

I'm playing around with Google's PlacePicker an until yesterday everything worked fine and the starting location was automatically my physical location. Today i was trying to modify the initial position with setLatLng() and my PlacePicker started to act weirdly by starting directly in the middle of the Atlantic ocean (what i suspect to be lat/lng 0,0) i tried to restore my code but the problem is persisting. Code is pretty simple and it's basically Google's guide default code but i'm posting it anyway :

//gets called from Button click
private void goToPlacePicker() throws GooglePlayServicesNotAvailableException, GooglePlayServicesRepairableException {

    PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
    startActivityForResult(builder.build(this), PLACE_PICKER_REQUEST);
}

//permissions
 <uses-permission android:name="android.permission.INTERNET"/>
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Davide Valiante
  • 155
  • 2
  • 12
  • is your location turned on in settings? – Vivek Mishra Dec 10 '16 at 12:22
  • if i turn It on "manually" everything works of course but by default it doesn't automatically sets the location to the last known location. It's my understanding that GPS can't be manually turned on/off for security reasons but i'd aspected at least a DialogBox asking the user to turn on their location by clicking "ok" or something on those lines – Davide Valiante Dec 10 '16 at 12:34
  • yes it can be done – Vivek Mishra Dec 10 '16 at 13:12
  • Could you please give me resources on how to implement this feature ? I've found 2 ways but apparently they were just using broken features and are currently fixed – Davide Valiante Dec 10 '16 at 14:32
  • Search for Android hive tutorial for GPS – Vivek Mishra Dec 10 '16 at 14:51

0 Answers0