GPS location / Cell id / Placing a call

29 April 2008

This post presents miscellanoeous tasks that you can do in your J2ME application.

Firstly, how to get GPS location. javax.microedition.location.Location provides support for this. Review the snippet below:

LocationProvider loc = LocationProvider.getInstance(null); 
loc.setLocationListener(ll,0,-1,-1); 
Location location = loc.getLocation(60*3);
String lat = location.getQualifiedCoordinates().getLatitude(); 
String lon = location.getQualifiedCoordinates().getLongitude();

Getting cell id is very easy:

String cellID = System.getProperty("phone.cid");

For placing a call, you n eed com.motorola.phone.

Dialer dialer = Dialer.getDefaultDialer(); 
dialer.startCall("6172531000");

del.icio.us:GPS location / Cell id / Placing a call  digg:GPS location / Cell id / Placing a call  spurl:GPS location / Cell id / Placing a call  wists:GPS location / Cell id / Placing a call  simpy:GPS location / Cell id / Placing a call  newsvine:GPS location / Cell id / Placing a call  blinklist:GPS location / Cell id / Placing a call  furl:GPS location / Cell id / Placing a call  reddit:GPS location / Cell id / Placing a call  fark:GPS location / Cell id / Placing a call  blogmarks:GPS location / Cell id / Placing a call  Y!:GPS location / Cell id / Placing a call  smarking:GPS location / Cell id / Placing a call  magnolia:GPS location / Cell id / Placing a call  segnalo:GPS location / Cell id / Placing a call  gifttagging:GPS location / Cell id / Placing a call

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: GPS location / Cell id / Placing a call

Leave a Reply