3

I have a Java EE application in which I would to add the function of finding the geo location of the mobile users.

I would like to track drivers, know their current location in a periodic basics. My app is a basic Java EE application. So if I am supposed to find the user location what is the best possible way?

I want it to happen automatically, keep updating once in ten mins or so. So can I do it by adding some available jars? Or do I have to create an Android app for this purpose?

I had found a few relevant post, but they discuss on finding the location that is Android specific. So what would be best for me to use in my app which is based on Oracle ADF technology?

Thanks in advance

-Rakesh

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Sam
  • 1,298
  • 6
  • 30
  • 65
  • So does your driver carry a Laptop with GPS or a mobile device? J2EE is not used for Mobile devices. – ankitjaininfo Dec 03 '12 at 12:54
  • @Ankur He has a mobile device . I only needs his location and i do not want him to use the applications . – Sam Dec 03 '12 at 12:59

1 Answers1

2

You can use the W3C Geolocation API within a smartphone's native web browser (Safari / Chrome) to retrieve the long/lat values.

Alastair McCormack
  • 26,573
  • 8
  • 77
  • 100
  • Does this mean that the user "driver in my case" should open his browser so that i could track him ? Is there an any implementation already ? – Sam Dec 04 '12 at 07:00
  • You've said you have a J2EE application, presumably this is web application running on a server. You can get the user's position using Javascript and the `navigator` object which is part of the API mentioned above. This will probably only work while the browser is open in the foreground. If you need to track a user permanently then you will probably have to write a smartphone/tablet app that can run in the background. – Alastair McCormack Dec 04 '12 at 19:30