File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public class MarkerPaddingActivity extends BaseActivity implements TencentMap.On
6969
7070 private final int PAGE_SIZE = 20 ;
7171 private PermissionDialog permissionDialog = null ;
72- private final String [] permissions = {permission .ACCESS_COARSE_LOCATION };
72+ private final String [] permissions = {permission .ACCESS_COARSE_LOCATION , permission . ACCESS_FINE_LOCATION };
7373 public MapView mMapView ;
7474 private TencentMap mTencentMap ;
7575 private RecyclerView recyclerView ;
@@ -208,7 +208,7 @@ private void startLocation() {
208208 //设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
209209 mTencentMap .setMyLocationEnabled (true );
210210
211- int err = locationManager .requestLocationUpdates (locationRequest , this , Looper .myLooper ());
211+ int err = locationManager .requestSingleFreshLocation (locationRequest , this , Looper .myLooper ());
212212 switch (err ) {
213213 case 1 :
214214 case 2 :
You can’t perform that action at this time.
0 commit comments