×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    1

    jsr 179 developing tips???

    Hello,

    i am developing the Gps application with jsr 179 api. the overall code works as follows

    It creates the location provider and then assigns the location listener which keeps on listening and get the location values for every certain mins i set it as 1min. so for every minute it gets the location value. so my doubt is that i assigned the location provider and listener once so is there any possibility of not avail of provider or listener. if anyone implemented the Gps tracking program. so please give some tips to implement. what are the common mistakes we do in assigning the locationprovider and listener.

    Thanks:-)

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: jsr 179 developing tips???

    You only need to retrieve the location provider once. If that fails, then this most likely means, the device doesn't have an integrated GPS receiver or it is not connected to an external one.
    Similarly, regarding the location listener, you only set it once and you specify how often it should listen for location updates. Now what could fail, is getting a valid location within the interval+timeout values you have specified when setting the location listener. If that's the case, you can always validate the location object you are retrieving by applying the .isValid method on it.

    If your question is related to the value of the arguments that should be passed to the setLocationListener method, setting the value of the interval, timeout and maxAge to -1 would ideally set the default values for the given location provider. That should work very well in most of the cases, but of course you can pass your own values, to reflect the frequency of the location retrieval that matches your needs.

    You can always go back to the documentation regarding this issue:
    http://library.developer.nokia.com/i...nProvider.html

    Be careful though, in case you set the interval to a value other that -1, your timeout and maxAge values should not be larger than the value of your interval (in your case 60).

    An example using JSR-179 can be found here:
    http://www.developer.nokia.com/Commu...ass_in_Java_ME

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

    Re: jsr 179 developing tips???

    This is an older article I wrote back in the days but it's still there : http://www.developer.nokia.com/Commu...aining_GPS_fix
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

Similar Threads

  1. Help and tips with mobile app
    By jitsejan in forum General Development Questions
    Replies: 3
    Last Post: 2010-05-18, 21:52
  2. Is developing an SDK equal to developing a static DLL?
    By killbuddha in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2007-02-08, 05:05
  3. Connection tips
    By Rafoso in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-10-04, 22:50
  4. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07

Posting Permissions

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