Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2009

    Question java.lang.InterruptedException in restaring the GPS!!!

    Hi All,
    I have developed an application to get the coordinates from the GPS.
    I am getting the coordinates in an interval of 3 minutes using timer.
    I am not seting the
    provider.setLocationListener(this, -1, 0, 0);
    while start of the GPS and also not doing
    provider.setLocationListener(null, -1, 0, 0);
    while stopping the GPS.
    And it's working fine for the first time.
    But after stopping the GPS when I am again going to start the GPS then I am getting the
    at com.sun.kvem.location.GPSLocationProvider.getLocationImpl
    at com.sun.kvem.location.LocationProviderImpl.getLocationNoCheck
    at com.sun.kvem.location.LocationProviderImpl.getLocation

    So please guide me how to resolve this issue...

    Thanks & Regards,

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Noida, India

    Re: java.lang.InterruptedException in restaring the GPS!!!

    More optimized way will be to get the GPS co-ordinates using Location Listener, don't go for polling every 3 mins.
    Go Green, Polling every 3 min will be a waste of resources whenever the device is stationary.
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 3
    Last Post: 2011-03-25, 20:22
  2. About : java.lang.error/Java.lang.SecurityException:Cannot use exit(), use midlet. ..
    By sisu.hang in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2010-08-11, 05:48
  3. Debug problem: java/lang/NoClassDefFoundError: java/lang/Object
    By d-safety in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2009-11-23, 20:12
  4. lcdui.Image.createImage -> java.lang.OutOfMemoryError: Java heap space
    By sbmcdeshan in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2009-02-23, 19:29
  5. java.lang.Error: ClassFormatError, java.lang.Class..unknown.()
    By kadro in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2007-08-23, 06:19

Posting Permissions

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