Reputation: 1291
I am beginner in phonegap. I have developed native apps in phonegap android. now this apps is only static, I want creat update button on my apps when i will clicked on update button then my webservice will called and this data stored locally in apps means in the local database.
Thanking you
Upvotes: 2
Views: 20065
Reputation: 111
You can use the following lines of code to call the Web Service in PhoneGap:-
$.post( url, { user_id:userID,password:password} , function( data ) {
if(data.status==true){
/*Your Code*/
}else{
/*Your Code*/
}
},"json");
Upvotes: 0
Reputation: 2170
A quick-and easy way is to call the service using AJAX, and you can use HTML5's localStorage to store the data.
Upvotes: 2
Reputation: 2511
A simple example that I personally like can be found here: http://coenraets.org/blog/2011/10/sample-application-with-jquery-mobile-and-phonegap/. It works with PHP / MySQL web server
Upvotes: 2