0

I need to integrate a simple Web API in my Android application, and I was looking for a way to do that.

I was told I should use a service, but other peoples told be about Robospice, AsyncTasks, and Java Threads.

What should I use ? Is there some ressources out there ?

asked Jul 22, 2015 at 19:01
8
  • 1
    That's a very broad question, with no single right answer. I suggest the Building Apps With Network Operations lesson from the Android tutorial as a place to start. RoboSpice and the like build on top of these concepts, but you need to get some sense of the basics first. There are better lessons around if you search for a bit, but I don't have anything bookmarked. Commented Jul 22, 2015 at 19:06
  • I'm trying to use an XML API. It is supposed to authentication (so everytime you start the application or try to do an operation the login context should be checked, and you should be redirected on a login activity), file upload, and collecting some informations. I understand this is a broad question, but I'm rather wondering what I should use, because everytime I ask someone for this he would give me another solution and that isn't helping me. Commented Jul 22, 2015 at 19:07
  • @servabat, What you're trying to do is not trivial at all. You need to have a fundamental understanding of the platform. You can't just wire up one or two tutorials you find on the internet. Also, don't expect us to do all that research and all the explaining for you. First decompose the problem into smaller parts, and research each part independently. If you still haven't given up by then, then try to get one thing working at a time. This may take you between six months and 4 weeks, depending on your current level of Java and your level of motivation. Commented Jul 22, 2015 at 19:15
  • @StephanBranczyk: I'm not trying to find a fast and easy solution, but because it is time consuming as you explain, I'm trying to find the solution I should 'learn', in order not to waste time on a bad solution. Commented Jul 22, 2015 at 19:19
  • 1
    Also keep in mind that in Android, there can be multiple perfectly valid answer to the same question. Just don't expect each answer to be all encompassing. Once decomposed, your problem is asking for many different things. It would take an entire book to answer everything adequately. And to be honest, those books already exist. So if you haven't taken the time to read/peruse the various books available on Android programming on Amazon or in a bookstore, it's very likely that you won't even take the time to properly read the answer of someone who gives you a very thoughtful fifty pages answer. Commented Jul 22, 2015 at 19:22

2 Answers 2

1

This goes through integrating a Web API into an Android app step by step, using AsyncTask.

http://blog.strikeiron.com/bid/73189/Integrate-a-REST-API-into-Android-Application-in-less-than-15-minutes

answered Jul 22, 2015 at 19:04
Sign up to request clarification or add additional context in comments.

Comments

0

For more improved and fast response use Android Asynchronous Http Client with Gson library : You will find a complete tutorial here

answered Jul 22, 2015 at 19:12

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.