devices supporting jsr 179
Are there any devices that currently support JSR 179? I've tried searching but can't find any so I'm guessing none? When are devices excpected to support the api?
Can someone list all other available location apis? I know Motorola has one for java. I'm eager to start development on an LBS app I have in mind and I don't think I can wait until the majority of devices begin to support JSR 179.
Thanks.
Re: devices supporting jsr 179
i have one code as follow
it is working fine in emulator but not on mobile phones
this is related to jsr-179
pls kindly help me
thank you
import java.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.Enumeration;
import java.util.Hashtable;
import javax.microedition.location.*;
public class Location extends MIDlet
{
String error = "";
private static Display display = null;
protected void startApp() throws MIDletStateChangeException
{
display = Display.getDisplay(this);
System.out.println("loading");
LocationProvider lp=null;
javax.microedition.location.Location location=null;
Criteria cr= new Criteria();
cr.setHorizontalAccuracy(5000);
cr.setVerticalAccuracy(5000);;
try
{
lp= LocationProvider.getInstance(cr);
}
catch(LocationException e)
{
addError(e);
}
try
{
//timeout
location = lp.getLocation(20);
}
catch(LocationException e)
{
addError(e);
}
catch(InterruptedException e)
{
addError(e);
}
String res="[RESULTS]\n";
try{
Coordinates coordinates = location.getQualifiedCoordinates();
res+="Altitude:"+coordinates.getAltitude()+"\n";
res+="Latitude:"+coordinates.getLatitude()+"\n";
res+="Longitude:"+coordinates.getLongitude()+"\n";
}catch(Exception e){
addError(e);
}
Form f = new Form("Results");
f.append(res);
f.append(error);
display.setCurrent(f);
}
void addError(Exception e){
e.printStackTrace();
error+=e.getMessage()+"\n";
}
protected void pauseApp()
{
}
protected void destroyApp(boolean unconditional)
throws MIDletStateChangeException
{
}
public static Display getDisplay()
{
return display;
}
}
plz rply fast
i live in india, mumbai
write suggation abt service provider if any,
Re: devices supporting jsr 179
siddhesh304,
1. Don't post a new question in a 7 year old thread, but start a new thread instead.
2. Don't post the same question in multiple threads.
3. Use CODE tags in your posts for code (makes it more readable as it keeps the intendation intact).
4. Tell us which phone model you've tried this on (and if it has a built-in GPS receiver, whether it is enabled/on or not).
5. Tell us which network operator you are using (whose SIM card you have).
6. If the phone does not have GPS, call your network operator, and ask them if they support network based location services or not. If not, there's no chance whatsoever that your app will get the location on their network.
7. Tell us how the program does not work in the phone you've tried it on. Does it install? Does it return any errors? Does it return unexpected location info? What?
8. Try it also on a phone with built-in GPS, and which has the GPS enabled (verify it with, e.g., a maps application).