How can I check the current status of the GPS receiver?

前端 未结 17 1765
时光取名叫无心
时光取名叫无心 2020-11-22 08:53

How can I check the current status of the GPS receiver? I already checked the LocationListener onStatusChanged method but somehow it seems that is not working,

17条回答
  •  迷失自我
    2020-11-22 09:55

    so many posts...

    GpsStatus.Listener gpsListener = new GpsStatus.Listener() {
                            public void onGpsStatusChanged(int event) {
                                if( event == GpsStatus.GPS_EVENT_FIRST_FIX){
                                    showMessageDialog("GPS fixed");
                                }
                            }
                     };
    

    adding this code, with addGpsListener... showMessageDialog ... just shows a standard dialog window with the string

    did the job perfectly for me :) thanks a lot :=) (sry for this post, not yet able to vote)

提交回复
热议问题