how to send data to server through api in android? - android

I'm implementing an app on android platform with web services. I'm able to fetch data from server through api. Now I want to send data to server through api. I didn't get proper code, Please let me know the standard code for this or any example for it.
Thanks,
Vishakha.

Which kind of server? What kind of information? Without more info it's difficult to help.
I'm assuming you wish to make a POST request to a webserver. If this is the case, you might want to try this answer.

Related

how to get JSON of WIX web site data

I want to make an Android and iOS app for a site dsstrucks.com
The thing is i am not able to get the JSON data of the site. Is there a way by which i can get JSON of WIX Site so that i can use it to create an App.
I want a way by which i can get all latest updates also, just like the woocommerce rest api. Or is there a way i can create my own API for this ?
I have tried POST MAN to check GET requests and still no luck. Any minor or major help would be great full.
Thank in Advance

Online database for android app

Recently I'm developing an android app and I need to store large amount of data in pre-populated online database. How can i do it? and what is the easiest way to do this? can someone please help?
You have to make a Web service with some database either MySQL, MongoDB, etc ... and the application using HTTP requests to WebServices and attempt the data.
Here I leave a pretty good example:
how-to-connect-android-with-php-mysql
You will need the following:
JSONParser class.
Corresponding API.
API should reference to database properly
Android class should call API URL. (eg. http://example.com/yourapi.php)
Android class should send http request using parameters as required by the API.
For further details and startup, you can always go http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/. The best example to start with, though not that secure. :-)

Set up a server and get feed from it in android

This may not be the type of question I am supposed to ask here but I don't have anywhere else to go. I want to make an android application which gets feed from a web-server and displays in the application. It will be kind of a newspaper app. I have done my share of work: I know android application developemnt: have made some apps. Also, I have an idea of UI: a listview with the feeds and then on selecting an element I will open another activity with the complete feed. What I wanted to know is:
How to set-up a server for this?
How to request?
Can I set-up a free server?
I dont want to use GCM as I don't think it allows sending pictures. Plus it allows small data to be sent. Also, I have no knowledge about the 3rd party server I may need to create for this.
I would want to post both text and photos (combined makes a post, total of around 10 posts) from the server. Please dont close as not a question. Any link, tutorial will be highly appreciated. For server side coding, I know php, .net. I have never coded in java for a server, but I can learn it.
Please follow following steps to get your project done.
Set up any php or Java or .Net Server (If you are aware of any of these web technologies)
After you set up server you need to make web service which will work as mediator to transfer data between your server and mobile.
Webservice response will be either in JSON or XML
Generate response according to your need and parse them on android side.
Display in listview :) :)
You can use JBOSS for your server, and do a Java Server with Webservices.
In your webservices you'll have a service that get all the feeds, and maybe another that request the complete feed...
Your "language" between the Android app and the Server, you can use XML with SOAP (ksoap2 for Android), or you can try JSON (I never used, but I will 'cause we goona need use in my service).
You can try find another free server side, but I think the SOAP is important in most of the servers to "talk" with your app.
I hope helped you.
[]s
Bertan

Sending data from android app to server

I'm new to android application development and I want to send data from an android app to MS SQL Sever.
Is it possible in android? If so, which methods can I use? If not, is there any alternative ways to send?
Can anyone help me? Thank you so much for reading.
You may send data via WebService. Please take a look at codeproject article and StackOverFlow Thread.
I am agree with #Walid and #adatapost that you need to create webservice for the same. And using webservice you can send and retrieve as per your requirement. So just try to search on the Android webservice call and webservice development articles. There are already many articles existed on the web currently.

Is an Android Service a good idea when backing up an app's data using a web service?

I'd like to add the ability for my android app to save changes to data (stored in its SQLite database) to a web server. The upload will be via HTTP POST, using JSON in the body of the request to describe the changes.
I'm wondering if I should use an android Service for this. I'd like the user to be able to continue interacting with the app while it's generating the JSON, making the call to the server, and waiting for the server to complete its work and return a response.
Thanks much!
Even better would be an IntentService
Edit: Now that the compatibility package is out I think the new Loader class may be the best option, possibly using the ASyncTask version or a variation of it.
Yes it is a very good idea to move all the webservice code into a service. The Google IO talk Developing Android REST client applications talks about many reasons why this is a good idea. It also covers other important considerations which relate to your problem which is effectively syncing your database to the cloud.

Categories

Resources