Android: Alert Dialog disappears and executes next Intent

后端 未结 2 1507
一生所求
一生所求 2021-01-17 04:19

I\'m using a GPS disabled AlertDialog and once the user enables GPS, I move onto another Activity via an Intent. The problem is that the AlertDialog appears and then moves o

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-17 05:05

    It looks like the problem is that while the GPS location isn't enabled, you are still getting a location in myLocation.getLocation.

    After you call createGpsDisabledAlert(), you probably should return instead of continuing with the method.

提交回复
热议问题