Reputation: 163
Description of my app :
I have an application built in simple HTML/CSS/Javascript-Jquery using PHONEGAP !! My app has a WCFService running on a server that does the communication with the DB.I have called the WCFService from my app using AJAX call !!!
Now that all is set and i have built the application and tested it on my mobile devices(ios/android/blackberry)!!
!!..BINGO..!! It worked fine while testing on WIFI connection.But when trying to connect using mobile GPRS(2g data) it fails. Should i specify any other settings to ensure my app runs on 2g network also ???
UPDATE:- MY AJAX CODE :
$.ajax({
url: http://www.xyzftp.com/WCFService/Service1.svc/rejectrequest,
data:JSON.stringify({login:{"loginid":userid,"reqType":"R"}}),
type: 'POST',
dataType:"json",
contentType: 'application/json',
success: function(data) {
$.each(data.GetRejectedRequestsMethodResult,function(key,val){
//my code on success//
error: function(data, status, jqXHR) {
alert('There was an error.');
}
}); // end $.ajax
Upvotes: 0
Views: 222
Reputation:
no seperate settings for that..try to detect your network connection type using the connection API.make sure that u have a considerable speed and ensure that u have enabled mobile data.. it should work..
Upvotes: 1