GPS returns for speed and longitude 0.0

I get 0.0 for the speed (except NaN invalid) and longitude.  Latitude and journey to return a valid number. It's on a Torch 9810 OS7 but the app is defined for the OS6.  Look in the console attached through Eclipse,

public class LocationListener implements javax.microedition.location.LocationListener{

    private static long lastFix = 0l;
    private static Object lock = new Object();

    public void locationUpdated(LocationProvider provider, Location location) {
        try {
            BlackBerryLocation loc = (BlackBerryLocation) location;
            double longitude = 0d;
            double latitude = 0d;
            if (loc.getQualifiedCoordinates() != null) {
                longitude = loc.getQualifiedCoordinates().getLongitude();
                latitude = loc.getQualifiedCoordinates().getLatitude();
            }
            float speed = loc.getSpeed();
            float course = loc.getCourse();
            setLastFix(loc.getTimestamp());
            GPSLocation gps = new GPSLocation(longitude, latitude, speed, course, (loc.getTimestamp() == 0l ? System.currentTimeMillis() : loc.getTimestamp()));
            gps.setValid(loc.isValid());
            gps.setStatus(loc.getStatus());
            gps.setError(loc.getError());
            gps.print();
            App.addToPool(gps);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void providerStateChanged(LocationProvider provider, int newState) {
        if (newState == LocationProvider.TEMPORARILY_UNAVAILABLE) {
            provider.reset();
            provider.setLocationListener(null, 0, 0, 0);
        }
        App.setupGpsPolling();
    }

    public static void setLastFix(long lastFix) {
        synchronized (lock) {
            if (lastFix != 0l)
                LocationListener.lastFix = lastFix;
        }
    }

    public static long getLastFix() {
        synchronized (lock) {
            return lastFix;
        }
    }

}

public class GPSLocation {
    ......
    public void print() {
        StringBuffer sb = new StringBuffer();
        sb.append("longitude: " + getLongitude()).append("\r\n");
        sb.append("latitude: " + getLatitude()).append("\r\n");
        sb.append("speed: " + getSpeed()).append("\r\n");
        sb.append("course: " + getCourse()).append("\r\n");
        sb.append("ts: " + getTimestamp()).append("\r\n");
        sb.append("stat: " + getStatus()).append("\r\n");
        sb.append("err: " + getError()).append("\r\n");
        sb.append("valid: " + isValid()).append("\r\n");
        System.out.println(sb.toString());
    }
    ......
}

I don't understand.  Do works that way.

           QualifiedCoordinates coor = location.getQualifiedCoordinates();
            if (coor != null) {
                longitude = coor.getLongitude();
                latitude = coor.getLatitude();
                }

Tags: BlackBerry Developers

Similar Questions

  • Application of blackBerry Smartphones GPS Simple for hiking and fishing

    Does anyone know a simple application to replace the old simple GPS devices?    I already found applications that I love for directions and maps.  What I'm looking for is an application that displays the longitude, latitude, direction, speed, distance, altitude, etc., without the need for internet connectivity.   I would like to replace my old Magellen for trail and the use of the sin.   I need to be able to set benchmarks, and then again navagate to them.    Typical use is hiking or fishing (I want to mark my holes of sin in the middle of the Lake).

    Thank you

    Dave

    This is a real good article comparing several system, of course some are subscription and fees of a moment.

    Put your eye on BBtracker, it "s not at all fancy, but pierce is exactly right $0.00

    Thank you

    Don't forget to adjust your thread. Put the check mark in the green box containing your answer! Thank you

    http://home.Comcast.NET/~tamsterra/op/Blackberry_GPS.htm

  • GPS latitude and longitude are not when no signal

    Hello

    I am buliding a BB 9700 GPS application. I am able to get the latitude and longitude through cellTower (using the Service Provider signal), but I am unable to get the latitude and longitude when there is no signal. I tried the criteria to false, but the lattude and longitude do not come.

    Please find the code below

    private LocationProvider _provider;
    private Criteria _criteria;
    boolean deviceReciever,cellSignal;
    
    String longitude, latitude,altitude,speed;
    
    private void FixLocation()
    {
          resetProvider();
          /** Initialize Criteria and LocationProvider instances. */
    
          deviceReciever = true;//receiving lattitude and longitude to phone gps reciever
          cellSignal; = false;//Disabling ph signals
    
          setupCriteria();
          createLocationProvider();
    
                   if(_provider!=null){
    
                      try{
                       _location = _provider.getLocation(5);
                     locationUpdated(_provider, _location);
                     }catch(InterruptedException e){
                            //log(e.getMessage());
                            System.out.println("Exception called --->"+e);
                       }catch(LocationException e)
                       {
                               //log(e.getMessage());
                               System.out.println("Exception called --->"+e);
                       }
                       /*-->
                       try
                       {
                            System.out.println("babaji");
                            System.out.println("The _interval="+_interval);
                            _interval = -1;
                            _provider.setLocationListener(this, _interval, 10, 20);
                       }
                       catch(Exception e)
                       {
                           System.out.println("Exception called-->"+e);
                       }
                       */
                   }
    
           }
    
        private void resetProvider()
        {
            if (_provider != null)
           {
              _provider.setLocationListener(null, 0, 0, 0);
              _provider.reset();
              _provider = null;
            }
         }
    
          private void setupCriteria()
          {
                _criteria = new Criteria();
                if( deviceReciever == true )
                {
                    _criteria.setCostAllowed(false);
    
                }
               else if( cellSignal == true )
                {
    
                    _criteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
                    _criteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
                    _criteria.setCostAllowed(true);
                    _criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
                }
           }
    
        private void createLocationProvider()
       {
                    /**
                 * Initialize _provider using _criteria.
                    */
                try
                {
                     _provider = LocationProvider.getInstance(_criteria);
                }
                catch (LocationException e)
                {
    
               }
          }
    
         public void locationUpdated(LocationProvider provider, Location location)
        {
                 if (location != null && location.isValid())
                 {
    
                      QualifiedCoordinates coordinates = location
                                        .getQualifiedCoordinates();
    
                        speed = Float.toString(location.getSpeed());
                        longitude = Double.toString(coordinates.getLongitude());
                        latitude = Double.toString(coordinates.getLatitude());
                        altitude = Float.toString(coordinates.getAltitude());
    
                        System.out.println("Longitude --->"+coordinates.getLongitude());
                        System.out.println("Latitude---->"+coordinates.getLatitude());
                        System.out.println("Altitude->"+coordinates.getAltitude());
                    }
    
         }
    

    The longitude and latitude are coming as null always if we I'm reciving the gps via the mobile gps receiver. If the signal of the mobile service provider then uses the lang and lat come.

    I don't want to use the service provier signal for lattitude and longitude.

    Please suggest me the error I made in the above code and assistance.

    Thanking you

    Standalone GPS works best outdoors, with a clear view of the sky.  At the very least, near a window.

    You can experiment with the timeout.

    (If these answers answer your question, please mark the thread as solved.  (Thank you).

  • IE is slow, hangs in Google, will run Firefox under Windows 7 with speed and security?

    I'm not very tech savy English so good please. I have a desktop Dell Studio with Intel 2 Quad Processer. I have used IE for 15 years and more. Started using Google Chrome for speed and better security about 6 months without any problem. Shortly after the beginning of the year Chrome started crashing every day and from 1/14 he broke the 10-12 times a day. I don't like losing stuff and having to stop, re - load, raise or re-store that Chrome was more than that was working properly.

    Will Firefox work in my system operating system. I loan on your security, password protection and other things that are touted on your website on Firefox, but I'm mostly concerned about accidents and what are the causes. Is the problem in my own system and not questions of brower?

    I just want to surf, read, watch you tube, facebook with friends and family. I am 65 years old and retired, and I'm really disguested with all the problems I encounter.

    I think Firefox is a good product, but I need answers to the questions I asked.

    We hope to hear from someone very soon on the issues that I raised. If I download Firefox, should I uninstall IE. I already have an installed Chrome =.

    Thank you
    Jim Yeary
    jyeary3 @ spring TX

    I do not know what is causing your Chrome or IE falls down, but you can give a Firefox. I'll give you a few different things you need to do before installing Firefox to make sure that your computer works well if.

    Install all Windows updates. Check several times until there is no more.

    Update your graphics Driver. Update your graphics drivers to use hardware acceleration and WebGL

    Scan of malware: troubleshoot Firefox problems caused by malicious software

    Once you have done this, install Firefox! How to download and install Firefox on Windows

  • Download GPS Latitude and Longitude of the Contact

    I'm stuck with this problem.

    I want to get the GPS latitude and longitude of the contact object.

    Can any post related code. ??

    Kind regards

    V: Vinay

    Thanks for the suggestion

    My code works fine now.

    I me call Blackberry card for the most part after the return of the thread.

    Now, I m call from BB after invoking card application

    landmarkArray = Locator.geocode (_search, null);

    in the thread itself. It works very well.

    Thank you all,.

    V: Vinay

  • I have iphone 5 c. I've updated new version 10.0.2. Now Weather app is working for different cities but does not not for my site which has already been demonstrated in latitude and longitude. Similarly maps application also does not work for my site

    I have iphone 5 c. I've updated new version 10.0.2. Now Weather app is working for different cities but does not not for my site which has already been demonstrated in latitude and longitude. Similarly maps application does not also work for my site.

    Settings > privacy > location Services > confirm you always give permission to these applications to use your location.

    If not, try these standard troubleshooting steps.

    -Reset: hold the Home and Power buttons until you see the logo Apple (10-15 seconds).

    -Restore your iDevice: https://support.apple.com/en-us/HT204184

    If your backup is in iTunes, make sure that it is encrypted.

  • I plan to upgrade my OS to El Capitan.  What are the processor speed and memory required for the operating system works well?

    I plan to upgrade my OS to El Capitan.  What are the processor speed and memory required for the operating system works well?

    I use a processor 2.3 GHz Intel Core i5 with DDR3 4 GB 1333 MHz memory.

    My last similar attempt on another machine resulted in a very slow computer.

    Thanks, Ron

    Apple says the following:

    General requirements

    • OS X 10.6.8 or later version
    • 2 GB memory
    • 8.8 GB of available storage

    For best performance, I would say not less 4 GB and preferably 8 GB or more.

    Your i5 is well able to support properly.

    http://www.Apple.com/OSX/how-to-upgrade/#Hardware Configuration

  • Error running on the SIMS 2 and need for Speed Carbon with WIN7 Ultimate 32 bit


    • Error running with the SIMS 2
    • The error that says: the DVD error running is not found
    • I tried to fix it: with XP SP3, VISTA SP2 compatibility mode (I installed the game and I want to play with the compatibility mode for XP with Vista, now I installed WIN7Ultimate 32bits and it doesn't work
    • I already downloaded the latest patch and still work does not correctly...
    With the CNSA, I have the same problem, it starts, but when loads of information to start playing, it opens a window saying the program cannot continue to run, restart the application and the ini.

    Hi fedelovrin,

    Do you have any error message during the installation of the game?
    Is that your DVD player plays all DVDs correctly?
    Could you give us the exact error message that you meet?
    Is the same error message on Need For Speed Carbon?
     
    Since this game is compatible with windows 7, it should work properly without compatibility mode.
    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?type=software&s=Sims%202
     
    Like you said you used the Windows XP on Windows Vista compatibility mode. Try to use under Windows 7 XP mode also and check.
    You can find more information on compatibility modes in the articles below:
    http://Windows.Microsoft.com/en-us/Windows7/what-is-program-compatibility
    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows
    http://Windows.Microsoft.com/en-us/Windows7/Program-Compatibility-Assistant-frequently-asked-questions
     
    Here is the link for the support of the SIMS 2:
    http://TheSims2.EA.com/help/index.php
     
    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • My laptop is operating completely normally and would never shut down on its own. __But when I try to play a game or during the plauing sometime example pes 2010 or need for speed, my laptop some time Shut down.

    My laptop Qosmio F50 works completely normally and would never shut down on its own.
    But I try to play a game pes 2010 example or the need for speed, my laptop long closed.
    It was good before, but after rebotting my computer this problem just recently started...
    I have Nvidia Geforce, DirectX 10 and all recommended Requirments for the games but sometimes I start a game or after 2 or 3 housr game it would be completely Shut Down My computer and when I would turn on the computer, he would say that it was not Shut Down normally.

    Alhajji,
    They suggested to do a factory restore, if a valid step to do.  I know this isn't the most fun thing to do, but if you restore the system failing factory (clean install of the operating system).  Then, run Windows update and update drivers.  At this point, you can install a game and test.  If the problem persists, it would look to be a possible hardware problem with the system.
    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Recently bought studio 15 laptop with windows 7 and I try to run need for speed pc underground game on her, but she does not appear and the message "speed.exe has stopped working" appears on the screen

    Recently bought studio 15 laptop with windows 7 and I try to run need for speed pc underground game on her, but she does not appear and the message "speed.exe has stopped working" appears on the screen. can someone help us?

    Hi Andy,.

    I checked the reported compatibility list, and the game is listed as compatible.  Work in 64-bit or 32-bit Windows 7?  I will try to reinstall the game, if you did an upgrade from Vista to Windows 7 recently.  If it is a new installation and does not, please visit the EA's Web site to get the latest patch for the game to see if that helps address your problem.  Let me know if you've done all that and you still have questions, and we can try something else.

    Kevin

  • When running Need for Speed Most Wanted game a black screen appears and freezes the system

    When running need for Speed \u200b\u200bMost wanted... I am facing problem that I get a black screen and my system hangs... end of mission need for speed... I see a box pop up displays

    get the solution online and qyit

    close the program

    debug the program

    and on the opening of the details, I see this

    Signature of the problem:
    Problem event name: APPCRASH
    Application name: NFS13.exe
    Application version: 1.0.0.0
    Application timestamp: 506ef77f
    Fault Module name: igd10iumd32.dll
    Fault Module Version: 9.18.10.3071
    Timestamp of Module error: 51493b0a
    Exception code: c0000005
    Exception offset: 0001 has 097
    OS version: 6.1.7601.2.1.0.256.48
    Locale ID: 1033
    Additional information 1: 0a9e
    More information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional information 3: 0a9e
    Additional information 4: 0a9e372d3b4ad19135b953a78882e789

    Original title: APPCRASH

    When running need for Speed \u200b\u200bMost wanted... I am facing problem that I get a black screen and my system hangs... end of mission need for speed... I see a box pop up displays

    get the solution online and qyit

    close the program

    debug the program

    and on the opening of the details, I see this

    Signature of the problem:
    Problem event name: APPCRASH
    Application name: NFS13.exe
    Application version: 1.0.0.0
    Application timestamp: 506ef77f
      Fault Module name: igd10iumd32.dll
    Fault Module Version: 9.18.10.3071
    Timestamp of Module error: 51493b0a
    Exception code: c0000005
    Exception offset: 0001 has 097
    OS version: 6.1.7601.2.1.0.256.48
    Locale ID: 1033
    Additional information 1: 0a9e
    More information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional information 3: 0a9e
    Additional information 4: 0a9e372d3b4ad19135b953a78882e789

    What is gd10iumd32.dll?

    These files more often belongs to the product shim NVIDIA D3D drivers.  and were most often developed by the NVIDIA Corporation. These files usually have NVIDIA D3D Shim Driver, Version 331.65 description

    Source:

    http://SystemExplorer.NET/file-database/file/igd10iumd32-dll

    What you can do

    1 see if you have the latest driver from Nvidia display.

    2. If you already later, uninstalling and reinstalling Nvidia Display.

    3 roll back to an older driver

  • "I lost the top of my Web page that has"File"Edit etc and the toolbar with the House for 'House' and the arrow of" return to the last page. Does anyone know how to reinstall these? I'm obviously not computer savy.

    Missing once more, the blue band at the top of my Web page that has the file ',' Edit etc and the toolbar with the House for 'Home' and the arrow «back to last page»

    == My grandchildren's play about that.

    Press the Alt key to display the Menu bar, then open view > toolbars and select menu bar and the bar of Navigation, so that they have a check mark.

  • Hi, I got my subscription for the year running last for Photoshop and Lightroom. Because I had the good idea to download the 2015 CC of Photoshop, I return to the evaluation period. I would like to know, when this period ends, will I get my subscribed v

    Hi, I got my subscription for the year running last for Photoshop and Lightroom. Because I had the good idea to download the version of Photoshop CC 2015 (I thought it was just an update...), I get to the evaluation period.

    I would like to know, when this period expires, will I get my purchased version back or should I get a new subscription?

    If I get a new subscription, one is cancelled automatically, or do I have to do something else?

    Thanks a lot for the answers!

    If you are subscribed to the creative cloud, Creative Cloud 15 updates are included.

    If when you updated, all or part of the CC apps show 'trial start or buy now' in the creative cloud desktop application, please see this link:

    https://helpx.Adobe.com/manage-account-membership/CC-reverts-to-trial.html

  • How to convert latitude and longitude bb10 postal code?

    Hi, I want to know how to get the zip code of North latitude and longitudein BB10. I had the latitude, longitude and now I need to convert it to a zip code.

    I tried under document bb10 code

    /Reverse GeoCoding
    QStringList serviceProviders =
            QGeoServiceProvider::availableServiceProviders();
    if (serviceProviders.size()) {
        QGeoServiceProvider *serviceProvider = new QGeoServiceProvider(            serviceProviders.at(0));
        QGeoSearchManager *searchManager = serviceProvider->searchManager();
        //searchManager->setProperty("boundary", "city");    reply = searchManager->reverseGeocode(QGeoCoordinate(lat,long));
    
        bool finished_connected = QObject::connect(reply, SIGNAL(finished()),
                this, SLOT(readReverseGeocode()));
    
        bool error_connected = QObject::connect(reply,            SIGNAL(error(QGeoSearchReply::Error, QString)), this,            SLOT(reverseGeocodeError(QGeoSearchReply::Error, QString)));
    
    //Reverse GeoLocation
    void LocationHandler::readReverseGeocode() {
    QList LocDetList = reply->places();
    QGeoPlace locDe = LocDetList.at(0);qDebug() << "adr --> " << locDe.address().state();qDebug()<<"code"<deleteLater();
    }
    
    `void LocationHandler::reverseGeocodeError(QGeoSearchReply::Error error,
        QString errorString) {qDebug() << "( Geo::reverseGeocodeError ) " << errorString;reply->deleteLater();
    }
    
    I am getting below output
    
    adr "" code "" 
    
    I am not getting the values for code .What is the problem
    

    This code works for me, you can set a lower accuracy in meters (better accuracy) to ensure that you get a good Postal Code. My guess is (precision< 100)="" should="" be="">

    void Magic::positionUpdated(const QGeoPositionInfo & pos)
    {
        qDebug() << "positionUpdated()";
    
        // Get a GPS fix with an accuracy of less than 2000 meters and save the coordinates for further use
        qDebug() << pos.coordinate().latitude() << pos.coordinate().longitude();
        double accuracy = pos.attribute(QGeoPositionInfo::HorizontalAccuracy);
        qDebug() << accuracy;
        if (accuracy < 2000) {
            double lat = pos.coordinate().latitude();
            double lon = pos.coordinate().longitude();
            source->stopUpdates();
            if (!saved) {
    // This saved bool is needed because this slot gets called multiple time even after source->stopUpdates() is called. Initialize it to false in your constructor
                saved = true;
    
                // Initialize QGeoSearchManager
                QGeoSearchManager* searchManager;
                QGeoServiceProvider* serviceProvider;
                QStringList serviceProviders = QtMobilitySubset::QGeoServiceProvider::availableServiceProviders();
                if ( serviceProviders.size() ) {
                    serviceProvider = new QtMobilitySubset::QGeoServiceProvider(serviceProviders.at(0));
                    searchManager = serviceProvider->searchManager();
                }
    
                // create GeoCoordinate from latitude and longitude
                QtMobilitySubset::QGeoCoordinate myCoord =  QtMobilitySubset::QGeoCoordinate(lat, lon);
    
                // get reverseGeocode
                QGeoSearchReply* reply = searchManager->reverseGeocode(myCoord);
    
                QObject::connect(reply, SIGNAL(finished()), this, SLOT(readReverseGeocode()));
            }
        }
    }
    
    void Magic::readReverseGeocode()
    {
        qDebug() << "readReverseGeocode()";
        QGeoSearchReply* reply = qobject_cast(sender());
        // Save the city name to Settings for further use
        if (reply->error() != QGeoSearchReply::NoError)
            return;
    
        QList places = reply->places();
        if (places.length() <= 0)
            return;
        else {
            QGeoAddress address = places[0].address();
            qDebug() << "address.postcode() :" << address.postcode();
        }
        disconnect(reply, SIGNAL(finished()), this,SLOT(readReverseGeocode()));
        reply->deleteLater();
    }
    
  • How can I get my current coordinates (latitude and longitude)?

    Hello world

    I'm trying to design an application, but I don't know if I want to do is possible.

    I want to choose the current place of residence and then display in a map.

    Something like:

    MapView mapview = new MapView();

    Ask my current location lat and LNG somehow and save them in the lat, long variables.

    mapview.setLatitude (lat);

    mapview.setLongitude (lng);

    mapview.setZoom (4);

    Invoke.invokeApplication (Invoke.APP_TYPE_MAPS, new MapsArguments (mapview));

    (I mean, I want to show a different mapView depending on where I am)

    My problem: can be found my current latitude and longitude? How can I do?

    I'm completely lost on how to start looking for information, then I'll be happy to receive any help.

    Kind regards

    I changed my code and when I try it in the Simulator (my device Simulator is a 9930), it works.

    Now I try this code on my own devide a 9300 and I get whenever a message saying "invalid location.

    Can someone help me fix my mistake?

    This is the code I use:

    public class extendsscreen Mapa

    {

    public Mapa()

    {

    Criteria myCriteria =newCriteria();

    myCriteria.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);

    myCriteria.setVerticalAccuracy (Criteria.NO_REQUIREMENT);

    myCriteria.setCostAllowed (false);

    myCriteria.setPreferredPowerConsumption (Criteria.NO_REQUIREMENT);

    myCriteria.setPreferredResponseTime (100);

    Try

    {

    LocationProvider provider = LocationProvider.getInstance (myCriteria);

    provider.setLocationListener (newhandleGPSListener(), 10, -1, -1);

    }

    catch (LocationException Lex)

    {

    return;

    }

    }

    public public static class handleGPSListener implementsLocationListener

    {

    public void locationUpdated (LocationProvider provider, a place)

    {

    Coordinates of c =null;

    final double lat;

    final lon double ;

    if (location.isValid ())

    {

    c = location.getQualifiedCoordinates ();

    LAT = c.getLatitude ();

    LON = c.getLongitude ();

    UiApplication.getUiApplication () .invokeLater (newRunnable()

    {

    public void run()

    {

    Dialog.Alert (lat + "-" + lon);

    }

    });

    MapView mapview= new MapView();

    mapview.setLatitude ((int)lat);

    mapview.setLongitude ((int)lon);

    mapview.setZoom (4);

    Invoke.invokeApplication (Invoke.APP_TYPE_MAPS, new MapsArguments (mapview));

    }

    on the other

    {

    invalid location

    UiApplication.getUiApplication () .invokeLater (newRunnable()

    {

    public void run()

    {

    Dialog.Alert ("invalid location");

    }

    });

    }

    }

    public void providerStateChanged (LocationProvider provider, intnewState)

    {

    if (newState is LocationProvider.OUT_OF_SERVICE)

    {

    Unavailable because of governed by a COMPUTER GPS policy

    UiApplication.getUiApplication () .invokeLater (newRunnable()

    {

    public voidrun()

    {

    Dialog.Alert ("GPS out of stock because of the governed by a COMPUTER policy");

    }

    });

    }

    else if (newState is LocationProvider.TEMPORARILY_UNAVAILABLE)

    {

    no GPS fix

    UiApplication.getUiApplication () .invokeLater (newRunnable()

    {

    public voidrun()

    {

    Dialog.Alert ("no GPS solution");

    }

    });

    }

    }

    }

    }

Maybe you are looking for