Sending data from android app to server - android

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.

Related

Using web services

This question is maybe easy or unnecessary for you but I'm stuck here.
I'm trying to make application which store your spending money information. I finished the interface of the app, but the sql part isn't done because i wanna use that sql from internet. As i know, i should use web services ( maybe there is another way ). It should do like add 5 dollar to marketing, add 20 dollar to fuel categories.
Is the best way using web service?
How am i going to create and use my own db? ( i mean do i create db
on sql server and upload it to host, or creating db with codes on
android studio ? )
I've looked a lot of web services tutorials, but all of them is very confusing. I need tutorial with very basic explanation. Which tutorial or example do you suggest me?
You should host a SQL database and create a RESTfull HTTP web service to perform your desired functions. Make sure you develop the web service using JSON, since this can be easily parsed and used within Android. This tutorial should get you started, if you know php. You can of course create the API in the language of your preference.
From your android application you can then send HTTP requests to your webservice and parse the JSON response to use it in your API.
Your question is a bit broad, so I hope I provided means to get started. If you have any more specific questions about the above design, feel free to ask them.

heroku android beginning

Hi I am currently making a simple application in android that would connect to my database in Heroku and I was just wondering how I would use java code to connect to that database and fetch, and data to and from it?
Could someone give me advice on how to start. I was looking at this code for starters https://github.com/heroku/devcenter-java-database but I am still confused on how to fully understand the code. Do I need a .pom file and what is it for? And where are the values of "DATABASE_URL" and how would I be able to connect to my database that I made in Heroku etc.
Thank you for the help
Generally you wouldn't have a mobile phone connect directly to your database. You'd need to allow access to your db from the internet, its considered a bad idea for security. Instead you write a webservice that sits between your db and your client. The webservice reads the database, packages it up into some data format like XML or JSON, and sends it to the client who parses those values and does something with them (display, calculations, etc).
#Gabe Sechan is right. you need to build a API. your app will query the API and the API will get the data from db and sent back to Android via JSON...
To learn more abour API have a look here :
http://www.andrewhavens.com/posts/20/beginners-guide-to-creating-a-rest-api/
or a list of tutorials
http://blog.mashape.com/list-of-40-tutorials-on-how-to-create-an-api/
Hope this helps u buddy.

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

App Reading From SQL Server Web Service

I am in the process of creating an Android application which I want to use to execute a web service on my SQL server which in turn runs a stored procedure.
Having never completed a project like this before, I would like to know what the best way to go about this is?
I.e.
Displaying the SQL results
Reading from the web service
Adding password protection
I've developed apps before, but never SQL - related.
From doing some research I noted the need for a web service and created one, it's the process of running my app to read from it which I would like guidance with. Even a link to a helpful tutorial would be great. Thanks.
EDIT
To be more specific on the display.
Currently the stored procedure is displayed through crystal reports, however I have no need for 'drill - downs' or any functionality other than to actually view.
Something similar without the functionality would be fine.
I would recommend KSOAP with a SOAP webservice for proof of concept/tech demo http://seesharpgears.blogspot.com/2010/11/basic-ksoap-android-tutorial.html
or use the built-in JSON parser with a restful/json webservice
How to call a json webservice through android
Perhaps this link can help you, it has a useful video on the subject and detailed information.
Another link Comsuming WCF Services With Android
And also maybe this could help: Android Web Service MyWeather

how to send data to server through api in 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.

Categories

Resources