Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User amit.rathi1982's Avatar
    Join Date
    May 2011
    Posts
    28
    Hi,
    I tried to run the application on Nokia C5-03 which is one of the GPS enabled device. But when it try to get the longotude/latitude it throws exception- "location request timed out ".

    The coe I am using given below:

    public static String checkLocation() throws Exception {
    String string = "not found";
    try {
    Location l;
    LocationProvider lp;
    Coordinates c;
    Criteria cr = new Criteria();
    cr.setHorizontalAccuracy(500);
    lp = LocationProvider.getInstance(cr);
    l = lp.getLocation(60);
    c = l.getQualifiedCoordinates();
    if (c != null) {
    // Use coordinate information
    double lat = c.getLatitude();
    double lon = c.getLongitude();
    string = lat + "-" + lon;
    } else {
    string = "Location API failed";
    }
    System.out.println("location=" + string);
    //display.setCurrentItem(new StringItem("lat/lon", string));
    } catch (Exception e) {
    System.out.println("exception in check location=" + e.getMessage());
    e.printStackTrace();
    return e.getMessage();
    }
    return string;
    }

    Please Help !

    Thankssssss

  2. #2
    Registered User prssupe's Avatar
    Join Date
    Dec 2009
    Posts
    376
    Try running the application in open grounds ,as system is not getting the signals the exception is thrown

  3. #3
    Registered User amit.rathi1982's Avatar
    Join Date
    May 2011
    Posts
    28
    Hi,
    Is it possible to get the date and time by Location api?
    Actually I dont want to use system date time as it can be changed manually by user. So I want to use any server time that should not be controlled by end user.

    Please help me.
    Realy apreciate any suggestion.
    Thanks..

  4. #4
    Registered User prssupe's Avatar
    Join Date
    Dec 2009
    Posts
    376
    Just make a system HTTP call to any server in the response from server you will get date and time

  5. #5
    Registered User amit.rathi1982's Avatar
    Join Date
    May 2011
    Posts
    28
    Thanks buddy.

    One quick question: Can I get latitude/Longitude by using GPS but without active internet connection.

    Thanks..

  6. #6
    Registered User prssupe's Avatar
    Join Date
    Dec 2009
    Posts
    376
    Yes it is possible without GPRS but most phones connect to internet to take advantage of A-GPS

  7. #7
    Registered User amit.rathi1982's Avatar
    Join Date
    May 2011
    Posts
    28
    Hi,

    Thanks for your response.

    In Nokia E5, is it posible to get the latitude/longitude witout internet availability.

    Thanks

  8. #8
    Registered User amit.rathi1982's Avatar
    Join Date
    May 2011
    Posts
    28
    Hi,

    I am testing my application on Remot Device provided by Nokia Forum. But still it is throwing the same exception.

    I think the remote device must at any center location, and I am just using remotly that device , So I think it should return the latitude of the location where it is placed?

    Please verify me. Ill be very thank full to you.

    Thankssssssss

  9. #9
    Super Contributor Maveric's Avatar
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,102
    Hi there Amit,

    Yes, E5 has an integrated GPS receiver and also has the assisted A-GPS support.

    Best,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  10. #10
    Registered User amit.rathi1982's Avatar
    Join Date
    May 2011
    Posts
    28
    Thanks for the information Maveric,

    One quick question is- Can I get the UTC time from location API ?

    Thanks...

  11. #11
    Registered User prssupe's Avatar
    Join Date
    Dec 2009
    Posts
    376
    No getting time using location Api is not possible

Similar Threads

  1. location request timed out
    By mad1980 in forum Mobile Java General
    Replies: 5
    Last Post: 2012-05-08, 13:08
  2. HTTP Timed Out
    By somnathbanik in forum Symbian C++
    Replies: 38
    Last Post: 2010-03-04, 05:53
  3. Location request timed out?
    By crJava in forum Mobile Java General
    Replies: 4
    Last Post: 2009-02-16, 07:02
  4. Connection Timed Out
    By dotcdotc in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2005-09-02, 17:29
  5. Timed out error
    By S.S.Sudhakar in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2004-12-04, 05:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved