In this tutorial I’ll talk about creating an Android application which will get all it’s data from Http requests. To develop the application, I used WebView and WebViewClient classes of the Webkit.
This is a how-to focused on creating a RESTful java object at Android. I’ve used HTTPClient, HTTPEntry, HTTPGet, HTTPResponse, JSONArray and JSONObject classes. I think it’ll be useful if we need to use a web-service from client application.
The Praeda & Co. did a progress evaluation meeting in order to specify roadmap of the Prototype Demo. The division of labor is as follow:
- Eray takes the GUI development responsibility on Android. He will prepare pages with links to each other.
- Gokhan will setup the Database according to our diagrams and he will develop Database connection classes.
- Cansın will make a field research. He will try to embed the Webkit in Android with a native appearance. If he can achieve this task we will develop our GUI for Android with web technologies instead of a native GUI.
- Murat will make a deep investigation about Google Maps and he is also responsible for GPS functionalities.
Moreover, the team decided on using the Blog in a more efficient way. Everyone will try to prepare Tutorials and other type of documents about the work done.
The next meeting will be held on Jan 12 at 21.00.
This week, I tried to build a simple system where I combine EJB and Android technologies. The idea was simple, I would have an EJB application at server-side which has an Entity Bean to fetch some data and using a Session Bean I would forward this data to a Dynamic Web Application (a Local JSP Client). And another Remote Android Client would show this data too.
After lots of experiments and trying to follow this tutorial, I was able to create an Dynamic Web Project having a JSP which gets it data from an EJB Project’s Session Bean. Before I began to connect a database to this EJB Project using an Entity Bean, I tried to bind a Remote Android Client to this EJB. But, unfortunately there was no sources for this at web and I couldn’t get it done myself. Also from what I read at blogs, It seems that it’ll be wise to use Web Service approach instead of EJB.
So, I tried to implement a Web Service using my EJB Project. But, it was also another mystery for me. There is no good documentation/tutorial about how to create anything using Eclipse. Using Murat’s previous notes, I tried to generate my EJB based Web Service but, It was also another failure. So I simply create a regular Web Service using regular Java Classes.
But there is also a problem about Web Service approach. Android SDK doesn’t support a high level remote protocol like SOAP. To have SOAP support, we must use kSoap2 engine, which I had no time to look up.
This week was most of a failure for me, next week I’m planning to reach my regular Web services using Android with kSoap2.
This week I tried to find the reason why the Android could not connect to Last.fm via its API(at least I could not). This caused lots of troubles and avoided me to start to develop applications. However, I gained lots of experience about the architecture of an Android application, and I have found very useful resources that I want to share there.
After my exploration on the internet resources, I found some useful resources about Android API and I make a guess about the reason of why an Android machine could not use the Last.fm API to get information.
As  states that Android does not support javax.rmi package which is responsible for remote method invocation. And most probably Last.fm API uses this package for remote method invocation for data transformation between the server and the client. Therefore, when the Android tries to use Last.fm API, the javax.rmi package can not be found and it throws VerifyError exception indicating the class required can not be found.
Of course my guess can be wrong, however I wanted to share my idea about this issue because it can be helpful to analyze the problem and suggest a solution. But for now, if I identified the problem correctly, the most reasonable solution is to use web-services of Last.fm instead of the API. And  proposes some solutions. I am going to deal with it as soon as possible.
Moreover,  is another good resource, notes of a presentation, and includes lots of useful links at the end of the notes.