×

Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Registered User
    Join Date
    Dec 2012
    Location
    Mumbai, Maharashtra, India
    Posts
    79

    Unhappy How to resolve LocationException of ProximityListener in j2me

    My code for addProximityListener is -
    Coordinates proxcoord = new Coordinates(0.0, 0.0, 0.0f);
    proxcoord.setLatitude(Double.parseDouble(lat));
    proxcoord.setLongitude(Double.parseDouble(lon));
    provider.addProximityListener(this, proxcoord, 40.0f);

    While adding ProximityListener to location provider platform showing me an error which are as follows -
    javax.microedition.location.LocationException
    at javax.microedition.location.LocationProvider.addProximityListener(+7)
    at mobilelocationreminder.MobileLocationReminder.commandAction(+4414)
    at javax.microedition.lcdui.Displayable.callKeyPressed(+269)
    at javax.microedition.lcdui.Form.callKeyPressed(+243)
    at javax.microedition.lcdui.Display.consumeUIEvent(+101)
    at javax.microedition.lcdui.Display$DisplayAccessor.consumeEvent(+117)
    null

    I saw its error meaning in documentation which is
    LocationException - if the platform does not have resources to add a new listener and coordinates to be monitored or does not support proximity monitoring at all

    But i am not getting how to solve this problem??? please help ASAP......
    Thanks & regards
    RAHUL.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to resolve LocationException of ProximityListener in j2me

    Is this on the first call to addProximityListener(), or does the first call work?

    On what are you running this?

    Graham.

  3. #3
    Registered User
    Join Date
    Dec 2012
    Location
    Mumbai, Maharashtra, India
    Posts
    79

    Re: How to resolve LocationException of ProximityListener in j2me

    I am using emulator of Nokia SDK 1.0

    Yess on first call of proximityListener() its giving me an error...

    But on the oracle emulator it is working fine...
    Thanks & regards
    RAHUL.

  4. #4
    Registered User
    Join Date
    Sep 2012
    Location
    Timisoara, Romania
    Posts
    19

    Re: How to resolve LocationException of ProximityListener in j2me

    Quote Originally Posted by Rahul More View Post
    I am using emulator of Nokia SDK 1.0
    Why not 2.0 ?

  5. #5
    Registered User
    Join Date
    Dec 2012
    Location
    Mumbai, Maharashtra, India
    Posts
    79

    Re: How to resolve LocationException of ProximityListener in j2me

    Because SDK 2.0 doesn't support breakpoints. I am using NetBeans 7.2..
    Thanks & regards
    RAHUL.

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to resolve LocationException of ProximityListener in j2me

    Quote Originally Posted by Rahul More View Post
    LocationException - if the platform does not have resources to add a new listener and coordinates to be monitored or does not support proximity monitoring at all
    As it says, the device you're using does not support adding a ProximityListener. The Nokia SDK you're using emulates a Series 40 device. Try some Symbian devices through Remote Device Access, or using a Symbian SDK.

    Otherwise, you need to re-write the code to implement you're own proximity detections mechanism.

    Graham.

Similar Threads

  1. LocationException In J2me app
    By as.kulkarni67 in forum Mobile Java General
    Replies: 1
    Last Post: 2012-02-21, 20:10
  2. more than one proximityListener??
    By -Icaro- in forum Mobile Java Games
    Replies: 2
    Last Post: 2009-05-20, 18:05

Posting Permissions

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