Skip to content


Developing with Android SDK – Part 2: The Application

So this is part 2 of my newest project: learning Java and more importantly learning developing for and with the Android SDK. As I said in my previous post, I was very convinced that the process of learning and developing will not be without any struggles. Well I didn’t expect them to be that hard at all. But learning also means overcoming and solving the issues.

That I do learn developing with the Android SDK wasn’t only intended for my private use but also for a project I am thinking of at work. For doing the first steps I wanted to create an application privately which maybe could also be published later on. I would further on use the experiences to create more clean and precise code for my project at work.

So far the theory. My private application should deal with Amazon webservices which furthermore should be used to build something like a price-watcher application. It is great because I had a great and reasonable use case which would make me learn the SDK specific environment, as well as operate with web services in Java and also on mobile devices. This idea came to me before reading the terms of use of Amazon web services. Amazon unfortunately doesn’t allow using the web services on any mobile devices if not explicitely granted. Of course I wrote an email to the support and of course I did not get a positive answer.

So I finally decided to gain my knowledge through my work project. You might understand that I cannot talk about the project itself but I can tell you that it also includes leveraging web services for receiving and manipulating data. So I first had to solve the issue of finding a library to use for SOAP web services. After googling a little while I came to the conclusion of using ksoap2 for Android. Using the tutorial shown in this video (via) I decided to stick with the given example first. Which means involving a publicly available web service to simply convert a temperature value from Celsius to Fahrenheit and vice versa.

And there I was with the biggest struggle since I began working with the Android SDK. Developing at work means developing behind a proxy. Which additionaly means that I have to solve the problem of getting the Android emulator using proxy settings. While the given solution of the Android Developers Guide did not lead to solving the problem, I next stick the idea of injecting the database directly with the proxy settings. Let me tell that this solution as well as trying to set the proxy address from within the emulator image.

I finally ended up with this thread. You can find those complaint all over the internet. But I figured a little detail: I used the SDK Version 2.1 which obviously has the problems with proxy settings. Using an emulator running on Version 1.5 indeed lead to succesfully creating request over the proxy.

Of course this is not my final solution but at least I can go on developing and gaining experiences. After solving this major issue I can now go on leveraging ksoap2 in order to create SOAP requests with both simple as well as complex datatypes.

As soon as the proxy support changes even for later SDK version, I will go with the newest solution as well as post it here to keep you informed.

Posted in Java, Mobile, Programming, Projects.

Tagged with , , .

Share it