Retrieving # of satellites used in gps fix from Android

前端 未结 4 1209
鱼传尺愫
鱼传尺愫 2020-12-28 11:04

I am trying to retrieve the # of satellites used in the GPS fix. I have implemented two different methods, as shown below:

package ti.utils;

import android.         


        
4条回答
  •  青春惊慌失措
    2020-12-28 11:41

    If you can't get the numebr of satellites through GPS_EVENT_SATELLITE_STATUS then you could have your activity implement NmeaListener.

    If you implement the NmeaListener then you will have to parse the message string received in onNmeaReceived in order to extract the number of satellites. The NMEA formats are described here. Then you might like to do a Google search for "Java" + "NMEA parser"

提交回复
热议问题