Windows Mobile - Connect to Internet

谁说胖子不能爱 提交于 2019-12-13 03:54:12

问题


My application is making call to server at regular intervals. This requires internet connection either using Wi-Fi or GPRS.

This works ok when phone is waken (screen light is on). But, as soon as phone lights are off, it makes HttpWebRequest and tried to get Internet connection. Mobile starts connecting to Wi-Fi. But, Application does not wait for establishing connection to Wi-Fi.

  1. How can I connect to Wi-Fi or GPRS before making HttpWebRequest?
  2. How to specify that I want to connect to Wi-Fi or GPRS?

回答1:


I think their are two approaches to do:

  1. You can create a thread and do sleep/resume activity you want.
  2. you can use set timer for particular interval.


来源:https://stackoverflow.com/questions/4162319/windows-mobile-connect-to-internet

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