×

Discussion Board

Results 1 to 13 of 13

Hybrid View

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    20

    JSR - 179 LocationAPI Not Working On 5800ExpressMusic

    Hello,

    This is quite a funny situation I am finding myself in. A few days back, I wrote a simple, Midlet which captures the Lat/Lng value, and stores it in a file. I was using an E72 at that point of time. Now, when I try running the same code on a 5800, I don't get the desired output.

    1. I have not made any significant changes to the code since then,
    2. I don't have access to an E72 at this point of time, so I can't retest it on the same device,
    3. I have checked the specs for 5800, and it supports JSR-179, and has a GPS chip in it as well.

    Can anyone please help me out a little, with this?



    Code Snippet :
    Code:
    // GPS location related
    public static int GPS_horizontalAccuracy = 100;
    public static int GPS_locationFixTimeout = 60;
    
    // set the criteria and get the location provider
    Criteria criteria = new Criteria();
    criteria.setHorizontalAccuracy(test.GPS_horizontalAccuracy);
    try {
    	// marker
    	form.append("\n Entered Try-Catch Block...");
    			
    	LocationProvider locationProvider = LocationProvider.getInstance(criteria);
    			
    	// marker
    	form.append("\n Got Instance...");
    			
    	Location location = locationProvider.getLocation(test.GPS_locationFixTimeout);
    			
    	// marker
    	form.append("\n Got Locational Fix...");
    			
    	Coordinates coordinates = location.getQualifiedCoordinates();
    			
    	// marker
    	form.append("\n Got Coordinates...");
    			
    	location_str = "(" + coordinates.getLatitude() + ", " + coordinates.getLongitude() + ")";
    
    	// marker
    	form.append("\n Done!");
    } catch (LocationException e) {
    	form.append("LocationException in getLocation");
    	form.append(e.getMessage());
    } catch (InterruptedException e) {
    	form.append("InterruptedException in getLocation");
    	form.append(e.getMessage());
    } catch (IOException e) {
    	form.append("IOException in getLocation");
    	form.append(e.getMessage());
    }

    Expected Output :
    Entered Try-Catch Block...
    Got Instance...
    Locational Fix...
    Got Coordinates...
    Done!


    Actual Output :
    Entered Try-Catch Block...
    Got Instance...
    LocationException in getLocation
    Location request timed out

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: JSR - 179 LocationAPI Not Working On 5800ExpressMusic

    It looks that your 5800Xm is not able to get the GPS lock and hence it gives time out.

    Try OVI-maps on this device or google maps or device inbuilt location app and once you get the GPS lock in that app, try your app at the same moment, it will start working.

    Check settings, A-GPS and all other ways to get GPS lat/long should be selected in settings.

    thanks,
    Ekta

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    20

    Re: JSR - 179 LocationAPI Not Working On 5800ExpressMusic

    I checked all the settings. They are proper. I also tested on a host of other devices as well. Its STILL not working. Can anyone please suggest anything here? I am thinking, its some configuration error. There can't be much wrong with this code. Its only a bunch of API calls. Any pointers will be helpful...

    -Rohitesh.

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

    Re: JSR - 179 LocationAPI Not Working On 5800ExpressMusic

    I'd try different Criteria's... For example on some devices setting a Power Criteria will simply stop the provider providing any Locations...
    Also have you specifically tried what ektasrv has asked ? As in have you tried the standard Nokia Maps app on the device ? Does that one actually receive GPS positions ?

  5. #5
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: JSR - 179 LocationAPI Not Working On 5800ExpressMusic

    Rohitesh,

    Its important that you first check if the GPS chip on the device is working or not, so try OVI maps and let us know the results? are getting a GPS fix.

    thanks,
    Ekta

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    20

    Re: JSR - 179 LocationAPI Not Working On 5800ExpressMusic

    @ektasrv @Tiger79

    There's a small problem. I don't have access to a phone that has a GPS chip, till Monday! So, gotta wait for another day or two, for that. I will update here, as soon as I can get my hands on one.

    Cheers,
    Rohitesh.

Similar Threads

  1. JSR 179 working on N95?
    By chrisgnicholas in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2009-01-29, 08:10
  2. JSR 179 with no GPS
    By Larry101 in forum Mobile Java General
    Replies: 1
    Last Post: 2008-05-28, 15:10
  3. No rule to male target
    By arayappan_it in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2008-02-28, 10:49
  4. E61, CDC & JSR 179
    By jdesjean in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2007-06-27, 13:41
  5. JSR 179 Implementation
    By gruntzd in forum Mobile Java General
    Replies: 1
    Last Post: 2007-02-26, 07:31

Posting Permissions

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