开发者

PhoneGap doesn't wake up wireless connection when using ajax

开发者 https://www.devze.com 2023-03-22 23:21 出处:网络
I have a problem using phonegap with an iphone4. When the wireless connection (wifi in my case) of the iphone4is \'sleeping\' it will not wake up when I make an ajax call to the server. Therefore the

I have a problem using phonegap with an iphone4. When the wireless connection (wifi in my case) of the iphone4 is 'sleeping' it will not wake up when I make an ajax call to the server. Therefore the ajax call will fail. As a 开发者_JAVA百科temporary workaround I quickly go into the browser to go to a random webpage the connection wakes up. Then when I go back to my app the ajax call works. Any ideas? Or Do I have to write a phonegap plugin that uses the Cocoa NSURLRequest and NSURLConnection APIs?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号