Android Location return null after Enabling GPS in dialog

后端 未结 3 1852
一整个雨季
一整个雨季 2021-02-06 06:55

When I enter a screen, I check for if GPS is turned on, if not, the dialog to enable GPS is shown. When user clicks Yes, onActivityResult -> GPS is turned on and I try to get th

3条回答
  •  忘了有多久
    2021-02-06 07:43

    Add this override method for me its worked fine--

    @Override public void onLocationChanged(Location location) { getLocation("onLocationChanged"); }

提交回复
热议问题