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 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.
This week I started to work on Last.fm and Google Android. I started to get familiar Eclipse Plugin of Google Android. For example I learned something about Dalvik Debug Monitor Service (DDMS) like how to log etc. Moreover, I made connections to Last.fm services from pure Java application. However, I could not connect to the services on the Android because it throws: “java.lang.VerifyError: net.roarsoftware.lastfm.Caller” exception and I am going to try to solve this problem as soon as possible. Lastly, I did some test using SVN.