×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    72

    Getting Current location

    hi

    I am developing an application, where I need to find the location of the mobile phone, where is its position.

    I am developing the application for nokia 6110. I know that i can read the latitudes and longitudes from the GPS data. But i don't know how to do it.

    Can anyone help me to do it? Please help me.

    Thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Getting Current location

    Hi amishra,

    you can find some good code on how to read Location data in Java ME here:

    * http://wiki.forum.nokia.com/index.ph...E_Location_API
    * http://wiki.forum.nokia.com/index.php/Make_your_own_map
    * http://wiki.forum.nokia.com/index.ph..._Bluetooth_GPS (for phones not supporting JSR 179)

    Also, good documentation and examples are available on Forum Nokia related page:

    http://www.forum.nokia.com/main/reso.../location.html

    Pit

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    72

    Re: Getting Current location

    thanks

    can I try this code in emulator or do i need to run the application in my mobile phone? because when i tried to run it in emulator it gives me a alert message.

    When i run this in emulator then the result is always lat:0 and log:0.

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Getting Current location

    If you're using WTK emulator, you can manually set latitute/longitute coordinates by going into emulator menu (while it's running) and choosing "MIDlet -> External events" option. There you will find a tool for easy setting all those values.

    Also, check this video tutorial for a full video introduction to Location API usage using WTK:

    http://developers.sun.com/mobility/w.../wtk-lapi.html

    Pit

  5. #5
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    72

    Re: Getting Current location

    thanks

    it really helped alot to me. I am very new to this mobile programming field so I am finding it difficult to do.

    There is another problem related to this location coordinates. Actually I need to run this getting coordinates of the mobile phone when the application starts. This should run in the background of the application.

    Can you suggest me any way to do this, or some tutorial links of thread handling, I could not find any which could really help me.

    Looking forward for your reply.

    Thanks.

  6. #6
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Getting Current location

    Some good tutorials about threading are available on Sun's website:

    http://developers.sun.com/mobility/m...es/threading2/
    http://developers.sun.com/mobility/m...les/threading/

    Pit

  7. #7
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    72

    Re: Getting Current location

    As you said I tried to run the application that i have developed to get the current location in J2ME wireless toolkit, but when i tried to build the application there was an error saying

    C:\WTK20\apps\test_Location\src\main.java:3: package javax.microedition.location does not exist
    import javax.microedition.location.*;

    I am not able to run the application.

  8. #8
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Getting Current location

    Afaik, WTK 2.0 does not include Location API.

    If this is the case, you should download a more recent version from Sun's website: http://java.sun.com/products/sjwtoolkit/.

    Pit

Similar Threads

  1. s60 3rd ed emulator crash
    By Kimau in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-06-18, 22:12
  2. where is python location on mobile phone
    By lb213_2000 in forum Symbian
    Replies: 1
    Last Post: 2007-11-05, 08:56
  3. Current Location of Phone
    By amitaggarwal in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-10-02, 07:36

Posting Permissions

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