Determine location using Microsoft Location Service API in Windowsphone7

谁都会走 提交于 2019-12-12 04:58:04

问题


I submit my app on windows-phone7 store, Microsoft need following requirement to certify the app. The following requirements apply to applications that receive the location of a user's mobile device: 2.7.1 Your application must determine location using Microsoft Location Service API. 2.7.2 The privacy policy of your application must inform users about how location data from the Location Service API is used and disclosed and the controls that users have over the use and sharing of location data. This can be hosted within or directly linked from the application. Please help me what i want to mentioned or implement to certify the app.


回答1:


Here is the code I use to get the location.

            private static GeoCoordinateWatcher Watcher;            

            private void StartGeoWatcher()
            {

                if (Watcher == null)
                {
                    Watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);
                    Watcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(OnPositionChanged);
                    Watcher.TryStart(false, System.TimeSpan.FromMilliseconds(1000));
                }

            }

            private void OnPositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e)
            {

                    latitude = e.Position.Location.Latitude;
                    longitude = e.Position.Location.Longitude;


            }


来源:https://stackoverflow.com/questions/8707840/determine-location-using-microsoft-location-service-api-in-windowsphone7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!