×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Bizzare Problem GPS

    Hi All,

    is there something like gps lock in gps, I had built an app that after 20-27 min shows no GPS found and while my app is not getting the GPS the default nokia's app also doesn't get GPS and yes I do tested under open sky and when I close my app nokia's app shows gps values nd also mt app shows GPS found when I restarted my app and my position remains the same i.e. under open clear sky

    So do any one know what is the problem
    Regards,
    Saurabh

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Bizzare Problem GPS

    Test only with Nokia app; for 1 hrs and see does it blocks off as it happens in the case of your app.
    If No, then it means that there is someproblem with your coding that blocks the resources fo GPS.

    thanks,
    ~Amitabh
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Bizzare Problem GPS

    I have already tested this to check if there is some problem with my device but the testing results iin proper working of nokia GPS app
    Regards,
    Saurabh

  4. #4
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Bizzare Problem GPS

    ok, so from your last post I assume the gps works under the nokia app, because from the first post it sounds like it actually didnt work...
    If the gps doesnt work in any app (nokia or own) then there is a good chance the integrated gps is faulty. If it does work under nokia's Map application it should work under your own...
    Sometimes gps has a very hard time getting a fix, even under clear sky (for example I know it's very very difficult for me to get a fix around 10-11 in the morning, even with a free and clear sky)...
    I'd say try to get a fix somewhere else, maybe in the weekend when you go to visit family members
    Also you might want to try to get a fix with the Maps application first, then start your own, or otherwise first a fix with the Maps application, then turn phone off and on and try with your own app...
    A last possible reason it doesn't work might be that your code is wrong...

  5. #5
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Bizzare Problem GPS

    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);
                
    lpLocationProvider.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); 
    Regards,
    Saurabh

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Bizzare Problem GPS

    ok just a couple of tips here,
    try to use the easiest-going Criteria... Something like

    criteria = new Criteria();
    criteria.setCostAllowed(true);
    criteria.setPreferredPowerConsumption(Criteria.NO_REQUIREMENT);

    Also try to implement the LocationListener interface instead of polling with the getLocation() method...
    The LocationListener interface will supply you with a GPS position whenever it's available...
    You can see it as an interrupt-driven system whilst what you are trying is a polling-system...

  7. #7
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Bizzare Problem GPS

    Thanks tiger I will make the following changes and update you here soon
    Regards,
    Saurabh

  8. #8
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Bizzare Problem GPS

    HI tiger I applied following changes but all goes in vain with no result
    Regards,
    Saurabh

  9. #9
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Bizzare Problem GPS

    how have you implemented the locationlistener interface ?
    and on which device are you testing ?

  10. #10
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Bizzare Problem GPS

    no I haven't implemented location listener bcoz of requirement of my project I have to get gps data every 20 sec and the interface will provide GPS only when a fix is available
    Regards,
    Saurabh

  11. #11
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Bizzare Problem GPS

    that actually isn't true...
    have you read the documentation thoroughly ?

    http://library.forum.nokia.com/topic...nProvider.html

    and have a look at the setLocationListener() method, and look specifically at its parameters...

    Just a tip : the JSR-179 API isn't that big, you might just as well browse the Javadocs and at least have an idea which methods exist, what they are used for, and what's possible with them...

    Btw, also your method of polling will only return a Location if a fix is available !
    Last edited by Tiger79; 2009-09-15 at 11:52.

Similar Threads

  1. 5800 v21 gps problem
    By denonji in forum General Development Questions
    Replies: 1
    Last Post: 2009-07-02, 11:09
  2. Modules required :)
    By neil.young in forum Symbian
    Replies: 20
    Last Post: 2009-06-07, 11:35
  3. N93i + TomTom GPS receiver problem
    By wrxch in forum Bluetooth Technology
    Replies: 2
    Last Post: 2008-05-25, 21:48
  4. Nokia Maps for N72 - connectivity problem with Holux M1000 GPS receiver
    By bhuiyanhome in forum General Development Questions
    Replies: 3
    Last Post: 2008-02-23, 11:57
  5. Problem with GPS class(com.nokia.m2m.orb.idl.gps)
    By CONTEMPO in forum Nokia M2M
    Replies: 1
    Last Post: 2005-01-27, 07:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×