Retrieve data from a web server for android application

I am developing an application that needs to retrieve some data from a web server. But I have no idea how can this be possible?

Asked by: Vanessa326 | Posted: 24-01-2022

Answer 1

You need to create what is called a web service. This web service acts as a web page that can be read easily by machines. This page will let your program make HTTP posts and gets (Just like a web browser) in order to request and receive information. You can look at this page for the Google Maps API to see an example of how it works.

For the protocol that you use to communicate, you have many options. Among the most popular are JSON and XML.

To create the web service itself you have a multitude of options. It seems to be Java Servlet s and PHP are popular, but there are many others (ASP, Perl, Python ...).

Answered by: Chloe283 | Posted: 25-02-2022

Similar questions

How to create database for android application on remote webserver through java

i am devloping an android application thr java.i want to create or place the db on remote server,but not getting idea how to do this.plz help me .any code will be apriciated, thanks

java - How would i interact between webserver and android application based on GPS locations?

I want to develop an application for android that will enable user1 to input locations. and then based on a user2 location that user2 locations will update. What would be the best way to store this data, holding it on a server? then what would be the best way for the user2 list of locations to be updated. Would the server take the friends gps location and then based on a certain radius return a list of loc...

java - Sending an image from an application to a webserver

I was wondering what the preferred way of sending an image to a webserver from an android application? I've seen people opening up sockets and send the actual image data. base64 encoding it and sending it as a string. What is the preferred way? Can someone post some examples as well. Thanks

php - How to upload image from Android application to a webserver into a specific folder

How to move an image from android to specified folder on a web server This is my android code package com.example.bitmaptest; import; import; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.clie...

webserver - WiFi module in an android application

My project is to develop a remote home control using an android application and web server integrated in a Raspberry pi and communicate with an Arduino cart so to do this thing I have to use a WiFi module in my android application. How to develop this module in my application?

java - Android application doesnot show data from webserver

I want to develop an android application which fetches data from web server (my free domain account on and displays it on my android application in a List view. The problem which i faced from last 5 days is that when i run my PHP script on localhost(WAMP) and call this from emulator using this link it runs fine.But when i place...

android - Ionic 3 sync mobile application with webserver data even if app is not running

We have a ionic 3 application which is creating a native calendar event in google calendar / IOS native calendar. The data for these calendar events is provided by the webserver (REST API) We want to sync the calendar events, even if application is not running for few days? We would like to keep the application in sync with the data that is present on the webserver. Steps User opens the app , Res...

javascript - three.js on Android: will I need to run a local webserver in my android application?

I am working on a WebGL app developed with three.js. When I test this app on my computer, I need to run a local server as mentioned here. When I will run my three.js/WebGL app in a webview of my app, will I need to run a local webserver in my app? If yes, how to do that? Thanks.

android application memory leaks

I am using kind of results search engine, problem is to remember the searching criteria i made singleton static class which keeps only one instance. In my application there are lots of class level private variables, lots of public static variables, a big util class which contains only static final methods. problem is my application get crash any time any where any spot and interesting thing is crash code a...

Android Application data should not be released by android OS

public class MYApplication extends Application { String property; setter getter } does above code make sure property will not be collectied by android OS if not used for a long period of time.

Android Email application - Is it possible to get all the details which are configured in Email application

Is there any way to get in the code: Email id Password SMTP host SMTP port which the user used to setup his Email account with the Android built in Email application Required because, I am written a MailSender class using JavaMail API there I need to send the mail using the details what user configured in Built in Android Email application.

Android Intent for Twitter application

Is it possible to show a list of applications (with intent.createChooser) that only show me my twitter apps on my phone (so htc peep (htc hero) or twitdroid). I have tried it with intent.settype("application/twitter") but it doesnt find any apps for twitter and only shows my mail apps. Thank you, Wouter

Should a legacy Android application be rebuilt using SDK 2.1?

I have an Android application that uses the well known Strategies for Legacy Applications. It is build with the Android SDK 2.0 with manifest settings minSdkVersion="3" (API 1.5) and targetSdkVersion="5" (2.0). Question1: Since maxSdkVersion is not specified, the application should be...

android - Intent to pick an installed application slow in my activity, why?

If you long press on your homescreen and pick to add an application shortcut, you will be greeted with a listview showing all of your instal applications. I needed this same functionality in my application so I copied the intent from the launcher source: Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); Intent pic...

web services - How to store data accessible to both a web site and android application?

I’m developing an Android and web application that will function as a service (use the same data). My question is how should the data be stored to allow for both the web and the android application to have access to the same set of data? Should the android application connect to the sites MySQL server to store/access data? If so how do I allow someone to access the data when they are not in ...

Android 1.6 SMS (older application code)

I have HTC Tattoo with Android 1.6. I have maed a Java program for SMS sending. I got the source on the Internet, I think, versions before 1.6. The problem is: SMSs are sent twice. What is a possible cause for this problem? If possible, please simply post sample code what works OK.

How to close Android application?

I want to close my application, so that it no longer runs in the background. How to do that? Is this good practice on Android platform? If I rely on the "back" button, it closes the app, but it stays in background. There is even application called "TaskKiller" just to kill those apps in the background.

listview - android application failing upon user scrolling - no 'obvious' error

I'm having a strange problem with Android 1.6 I have an application that has a ListView (found in Activity #1). The user can click on one of the rows in the ListView and is taken to a 2nd Activity (Activity # 2). User can then use the back button to go back to the ListView. The problem is that if the user scrolls down the list after returning from Activity # 2 the application crashes, bu...

Still can't find your answer? Check out these communities...

Android Google Support | Android Community | Android Community (Facebook) | Android