We help IT Professionals succeed at work.

J2ME communicate with Server usign Location Based

gorexy asked
Last Modified: 2013-11-24
  I would like to create an application for my parent.  They have mobile phone and I want to write a J2ME program inside the phone so that the phone will send the location for every 2 mins (using LBS / GPS etc..) to my server and so I know where they are.

  If it possible to do so?  If yes, any documentation or sample code can offer? Thanks!
Watch Question

it is definitely possible to do so.
But which phones do you intend to use for the same? You need to make sure that the phone has GPS support.
You can otherwise use a bluetooth GPS device and then connect to the device from your phone to find out hte location.

Here is a link for the same :

Here is another such link :
Here is another such link :
You can read up on the specs here :

JSR 179 provides LBS. Take a look at it here :

You will need the lapi.jar  - this includes the javax.microedition.location classess for the same.

Read up more here :

This should get you all that you need to do!


very good reference.

I have a question.  Should I have to access Internet in order to update my status?  Can I use free way (GPS) to do so?  I don't have internet connection using mobile.

You do not need an internet connection for this.

Basically, the location service is provided by GPS. Atleast for now, the GPS services are free, and all you need is a GPS receiver to receive the co-ords from the satellites.

Now, once you poll the GPS module, all you need to do is send the coordinates to some server or to another phone.
You can do this either via :

1) GPRS (The "internet" connection) : Just send the data over HTTp to some server
2) SMS : Just send the coordinates over SMS to some phone (your phone, if the sender is your parents phone)

Also, as your doubts have been resolved, I would appreciate if you could accept the solution :)

All the best


GPRS? but you said no need to use Internet connection?  Also, SMS is not practical, since it cannot always update the position.  Seems we still need Internet connection (wiFi, GPRS etc..) right?

Yes I will feedback your solution, don't worry
This one is on us!
(Get your first solution completely free - no credit card required)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.