I installed on my Android phone a servlet container app with i-Jetty and created a servlet that exchanges GPS locations. I know that creating an Android application would be easier, but in the end I want to use it in any device, so a servlet is better.
The problem is that I don’t know how to make my get the GPS location of the Android phone in my servlet class. Does anyone have an idea?
as @Guido said i-jetty project site says that “webapps developed for i-jetty have access to the Android API
So you have to add the imports that you want use from android and call the functions that you need. I only test get contacts but gps location should work as well.
ps: you can only test the servlet on android mobile otherwise you will have problems with the imports.