/// <summary>
        ///
        /// </summary>
        /// <param name="input"></param>
        public void Main(byte[] input)
        {
            //临时变量
            byte[]   basicLocInfo, extraLocInfo;
            string   Json;
            int      length, startIndex;
            BitArray bits;

            LocInfo locInfo = new LocInfo();

            try
            {
                #region 分离:位置基本和附加信息
                //分离"位置基本信息"
                startIndex   = 0;
                length       = 28;
                basicLocInfo = new byte[length];
                Array.Copy(input, 0, basicLocInfo, 0, length);
                startIndex = startIndex + length;

                //分离"位置附加信息项列表"
                length       = input.Length - 28;
                extraLocInfo = new byte[length];
                Array.Copy(input, startIndex, extraLocInfo, 0, length);
                startIndex = 0;
                #endregion

                #region 解析"位置基本信息"
                locInfo.basic.alarm.ToString();
                #endregion
            }
            catch (Exception e)
            {
            }
        }
Beispiel #2
0
        public void OnLocationChanged(global::Android.Locations.Location p0)
        {
            var li = new LocInfo {
                Loc = new GeoLoc {
                    Lat = p0.Latitude, Lng = p0.Longitude
                }
            };

            if (p0.HasAccuracy)
            {
                li.Accuracy = (int)p0.Accuracy;
            }
            CurLocInfo.Value = li;
        }