Thanks tiger for ur kind reply but I want to mention 1 thing although I have mentioned it in my first post might not be clear to you and all actually there is no problem in GPS the problem is
1...After 20-17 min my app doesnt get a fix
2...at the same time when I start nokia's gps app it also doesn't get a gps fix
3...Now I close my app and nokia's app start getting gps
4...and again I restarted my app my app also gets the gps fix
during 3 nd 4 pt time taken is not more than 10 sec and the location of testing remains open clear sky. So the conclusion is my app is faulty I am posting my code here
PHP Code:
public static void startGPS()
{
try
{
cr= new Criteria();
cr.setSpeedAndCourseRequired(true);
lp= LocationProvider.getInstance(cr);
pos = lp.getLocation(4);
nmeaStr = pos.getExtraInfo("application/X-jsr179-location-nmea");
try
{
parse = new Parser();
parse._parseNMEA0183(nmeaStr);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
catch (InterruptedException ex)
{
ex.printStackTrace();
}
catch (LocationException ex)
{
ex.printStackTrace();
}
}
THe above code is run when app is started and the same code is called after every 20 sec in another function having all the lines except the first two which are mentioned below are not in that another function
PHP Code:
cr= new Criteria();
cr.setSpeedAndCourseRequired(true);