Showing current location on android Google Map v2, But app crashes

后端 未结 2 1756
猫巷女王i
猫巷女王i 2021-01-26 10:05

Here is my Activity code

package com.example1.heartconnect;

import android.location.Location;
import android.os.Bundle;
import android.support.v4.app.FragmentAc         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 10:30

    Location loc = map.getMyLocation(); didn't wait for your current location

    See the example: http://developer.xamarin.com/recipes/android/os_device_resources/gps/get_current_device_location/

    Also see this: http://developer.android.com/training/location/retrieve-current.html

提交回复
热议问题