简体   繁体   中英

Check if GPS and Internet is turned on in windows 8 phone app?

I have an application I want to check whether the device has internet connect and also check whether the GPS is turned on before the start of application. If GPS is off Should direct the user to the settings Location page... and give a popup if internet is off.

can someone please guild me with this.

any kind of help is appreciated.

You can check the DataUsage class

Represents data usage information returned by the ConnectionProfile.GetLocalUsage method.

Check the two properties which this class provides ie, the BytesSent and BytesReceived .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM