Extract the GPS location in the device

Hi all

I want to get the GPS location as soon as possible. I use the blackberry 5.0 version. When I use the blackberry Simulator, I am able to read the current GPS position, but when I installed this application on my device, device is unable to get the GPS location. It is showing error and also I am not able to detect the error.

Neeraj Chauhan

Try this http://supportforums.blackberry.com/t5/Java-Development/How-to-get-Current-GPS-Location-from-the-Bla...

Tags: BlackBerry Developers

Similar Questions

  • Cannot find the location of the gps on the device

    in my application, I'm trying to find the location of the user.my code owrks in Simulator for the curve8300 and the 9000 "BOLD"

    but he does not get the cordinates on the device even though I update the gps manually using the options--> options--> gps.

    What to do

     package com.MyChamberApp;
    
        import javax.microedition.location.Criteria;
        import javax.microedition.location.Location;
        import javax.microedition.location.LocationListener;
        import javax.microedition.location.LocationProvider;
    
        public class GPS_Location {
         static double longi;
         static double lati;
    
         public GPS_Location() {
    
         }
    
         public void location()
         {
          new LocationTracker();
         }
    
         class LocationTracker
         {
          private LocationProvider provider;
          Criteria cr;
    
          public LocationTracker()
          {
           resetGPS();
          }
    
          public void resetGPS() {
    
          try {
          cr = new Criteria();
          cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH);
          cr.setPreferredResponseTime(120000);
                    cr.setCostAllowed(true);
          provider = LocationProvider.getInstance(cr);
          provider.getLocation(120);
          if (provider != null)
           {
            provider.setLocationListener(new MyLocationListener(), 1,1,1);
           }
          } catch (Exception e) {}
    
          }
    
          public void run(){}
    
         private class MyLocationListener implements LocationListener
             {
           public void providerStateChanged(LocationProvider provider,int newState)
           {
            if (newState == LocationProvider.TEMPORARILY_UNAVAILABLE)
            {
              provider.reset();
              resetGPS();
            }
           if (newState == LocationProvider.OUT_OF_SERVICE)
           {
            provider.reset();
            resetGPS();
           }
         }
    
         public void locationUpdated(LocationProvider provider,Location location)
          {
           if (location != null && location.isValid()) {
            try {
          lati = location.getQualifiedCoordinates().getLatitude();
          longi = location.getQualifiedCoordinates().getLongitude();
             } catch (Exception e) {}
         }
          }
        }
       }
     }
    

    Although the code seems fine for me, check with this code...

    Criteria criteria = new Criteria();
    
    criteria.setHorizontalAccuracy(50);
                criteria.setVerticalAccuracy(50);
                criteria.setCostAllowed(true);
                criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH);
                _locationProvider = LocationProvider.getInstance(criteria);
                  Location location =_locationProvider.getLocation(-1);
                _longitude = location.getQualifiedCoordinates().getLongitude();
                _latitude = location.getQualifiedCoordinates().getLatitude();
                 _altitude = location.getQualifiedCoordinates().getAltitude();
                 _speed = location.getSpeed();
                if(_locationProvider!=null)
                 {
                  _locationProvider.setLocationListener(new LocationListenerImpl(), _interval, 1, 1);
    
                }
    
  • GPS location works Simulator, but does not work in the device

    Hi all,

    I have problem with GPS location.

    I have the button through which I can get the latitude and longitude in Simulator via LocationProvider class.

    His work very well in the Simulator, but giving is not the result in the unit.

    I use Storm 9530 devices and curve 8830.

    Thank you

    Valter

    Thanks for your support,

    Finally, I found my location.

    The steps are:

    As a first step BBDeveloper mentioned

    Options of-> advanced-> GPS Options

    Now,.

    Start the application maps

    Select Menu-> start the GPS Navigation

    or

    Find the location-> where I am

    It will activate the GPS.

    Thank you and best regards,

    Valter

  • Get the GPS location API error - provider is not available

    Hello

    I am trying to access the information of location using Android location API (via LocationManager.GPS_PROVIDER), but without success. I get error "provider not available."

    AndroidManifest.xml has lines related to the relevant permissions:


    But I do not get prompt the same security to grant these permissions to my request.

    OS version 2.0.0.3894

    Build 73070

    Thank you.

    I solved this problem by restarting and place the device near a window.

    What I was wondering now is why Android player never asked security permission to access the location of the GPS. What is a function of development?

  • VISA: (Hex 0xBFFF0011) insufficient location information or the device or resource is not present in the system.

    See the other post on this subject, but my situation appeared a bit different (http://forums.ni.com/t5/LabVIEW/VISA-Hex-0xBFFF0011-Insufficient-location-information-or-the/td-p/69...

    My device manager says that the device is functioning correctly, MAX also tells me that the device is working properly, but I still get this error when I try to open a panel of test VISA in MAX or log VISA in labview.  When I click on validate in MAX under port settings that she even says that he opened a successful session of VISA.  But it does not connect in the Panel test VISA or in labview.  See the screenshots below.

    No device manager said that all was well with COM1, see the pictures attached.  I was able to get this working to uninstall the device and the removal of all the drivers and reinstalling.  Don't know what the problem was, but from the entire apparatus of zero was able to fix it.

  • NI LabVIEW driver for the SRS DS345 function generator generates error "(Hex 0xBFFF0011) insufficient location information or the device or resource is not present in the system."

    Hello

    We have a generator function SRS DS345.

    I just downloaded the driver NOR for the instrument on http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9149659CE034080020E748....

    After installation, the DS345 appears in MAX, and I can well communicate with him.

    However, if I run the srds345 to Started.vi, I get an error "location information insufficient (Hex 0xBFFF0011) or the device or resource is not present in the system" from initialize it with Options.vi srds345 sub - vi.

    The only change I did Exchange address GPIB 14 to 19, which is our function generator GPIB address. In addition, the

    Functions of SRS DS345 generator of function palette is empty, even after you restart LabVIEW (see attachment). I'm using LabVIEW 8.5.1.

    Your help in resolving this issue is appreciated. Thank you.

    Best regards

    Peter

    Have you installed the driver from LabVIEW or copied directly from inst.lib?

    The first is easier, and you don't have to restart LV more...

    Error in a not filled gpib address points. I have not checked if this driver has a resource name visa or a string of gpib address old but in the first case, try the little triangle on the right at the slect address instead of by hand.

  • Can I switch to Streets & Trips with GPS Locator 2010 free if I already have the version of 2005?

    Can I switch to Streets & Trips with GPS Locator 2010 free if I already have the version of 2005?

    Hi Little rebel,

    To upgrade Microsoft Streets & Trips with GPS Locator 2005, you just buy the new version of the software, streets & trips 2010. Hardware (GPS Locator) is continuing to function.

    Review: Streets & trips

    Community of users of streets & trips

    Tips & tricks for streets & trips

    Laptop GPS World

  • To improve the streets & trips 2008 to 2010 and use GPS Locator

    Original title: I streets and trips 2008 + GPS Locator. Can I upgrade to 2010 and continue to use the GPS Locator even connected to the USB port?
    I streets and trips 2008 + GPS Locator. Can I upgrade to 2010 and continue to use the GPS Locator even connected to the USB port?

    It is the instance of Vista installation.

    http://www.Microsoft.com/communities/newsgroups/en-us/default.aspx?DG=Microsoft.public.streets-trips

    Discussions in Streets and Trips

    Try the discussion above for your question.

    See you soon.

    Mick Murphy - Microsoft partner

  • Please select another location to extract the Setup program for:

    I was already accepted and ordered my playbook for free for several weeks, so I'm not terribly worried about the upcoming deadline... *.

    However, I am trying to sign my application and download it, so it will be available when playbooks are starting to be sold next month.

    I got my signature key and computer recorded, and everything worked perfectly the first time. I was pleasantly surprised. But the SDK, I had in January of obviously won't complie with the signing key, then I will try now to move from beta 1 to beta3

    However, the installation program itself for the WW SDK Beta3 seems to have issues... (I can't wait until hastily to all questions on the forum after I get installed)

    I was expected some compliing or test problems, but not a problem with the real install extraction itself.

    I downloaded the file (several times) to this URL:

    https://www.BlackBerry.com/downloads/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&DL=...

    Whenever I try to install it, I get the error message of InstallAnywhere: Please select another location to extract the Setup program for:

    Web search and the forums indicate that the download of the installer itself is corrupted and there is nothing I can do to solve.

    Therefore, I sit and I wait. Unless someone else wants to give me the file BlackBerryWebworksSDK which extract properly or give me some advice.

    Cliff

    * note: If something weird happen and my playbook NOT appear. I will be really pissed on faulty downloads and SDK buggy days to get any kind of response...

    FYI - it turns out that this problem is due to a bad ISP. I was down the packages and it was a story the download complete.

    Now, I'm trying to set up a new environment on another PC with a different ISP and I look at the Simulator are unable to install...

  • Get the location of the device

    I had my application built with HTML5 for OS7, I build for BB10 and I decided to go with a feel more native and waterfalls. I must admit however, the old WebWorks documentation was much wasier and friendly, you had a small example of using each feature.

    I'm having a problem getting the location of the device, I went through the sample application "Diagnoses of the situation", but it's really complicated (he has 3 classes of objects with a ton of features to get the location).

    I'm just trying to find the location of the device, using cell towers, every two minutes. I want to create and the entire class for this? Also, how to trigger this function of the part of Cascades?

    I'd appreciate any help!

    Hello

    Here's a simplified example of code. These files are from the empty project template by default in the IDE of Momentix (file-> New-> project-> BlackBerry Project-> Application of stunts-> empty project Standard). They have been updated to include cellsite positioning updates every two minutes. The output will simply through cost.

    applicationui.h:

    // Default empty project template
    #ifndef ApplicationUI_HPP_
    #define ApplicationUI_HPP_
    
    #include 
    
    #include 
    
    using ::QtMobilitySubset::QGeoPositionInfo;     // so the SIGNAL()/SLOT() macros can have matching signatures.
    
    namespace bb { namespace cascades { class Application; }}
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class ApplicationUI : public QObject
    {
        Q_OBJECT
    public:
        ApplicationUI(bb::cascades::Application *app);
        virtual ~ApplicationUI() {}
    
        void startCellSiteUpdates();
    
    public Q_SLOTS:
        void positionUpdated(const QGeoPositionInfo & pos);
        void positionUpdateTimeout();
    
    private:
        QtMobilitySubset::QGeoPositionInfoSource * _source;
    };
    
    #endif /* ApplicationUI_HPP_ */
    

    applicationui.cpp

    // Default empty project template
    #include "applicationui.hpp"
    
    #include 
    
    #include 
    #include 
    #include 
    
    #include 
    
    using namespace bb::cascades;
    
    ApplicationUI::ApplicationUI(bb::cascades::Application *app)
    : QObject(app)
    {
        // create scene document from main.qml asset
        // set parent to created document to ensure it exists for the whole application lifetime
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // create root object for the UI
        AbstractPane *root = qml->createRootObject();
        // set created root object as a scene
        app->setScene(root);
    
        // Instantiate the default QGeoPositionInfoSource
        _source = QtMobilitySubset::QGeoPositionInfoSource::createDefaultSource(this);
        if ( _source ) {        // connect to the QGeoPositionInfoSource's signals, to get the position info and/or error status
            connect(_source, SIGNAL(positionUpdated(const QGeoPositionInfo &)), this, SLOT(positionUpdated(const QGeoPositionInfo &)));
            connect(_source, SIGNAL(updateTimeout()), this, SLOT(positionUpdateTimeout()));
        }
    }
    
    // call this method to start the position updates
    void ApplicationUI::startCellSiteUpdates()
    {
        if ( !_source ) {
    
            std::cout << "Error getting default position info source" << std::endl;
            return;
        }
    
        // QtLocation allows control over which provider(s) will be queried for position info. NonSatellitePositioningMethods
        // includes wifi and cellsite fix types.
        _source->setPreferredPositioningMethods( QtMobilitySubset::QGeoPositionInfoSource::NonSatellitePositioningMethods );
    
        // On BlackBerry the default QGeoPositionInfoSource allows finer control over the fix type. This extension, and others, take advantage of the Qt property system.
        // Here we are interested only in cellsite fixes.
        _source->setProperty("fixType", "cellsite");
    
        // set the update interval to a couple of minutes.
        _source->setUpdateInterval(120000);
    
        // start the updates, which we expect to receive in ApplicationUI::positionUpdated()
        _source->startUpdates();
    }
    // slot connected to the QGeoPositionInfoSource::positionUpdated() signal
    void ApplicationUI::positionUpdated(const QGeoPositionInfo & pos)
    {
        // print out the position in a convenient format:
        std::cout << pos.coordinate().toString().toLatin1().constData() << std::endl;
    
        // print out the accuracy as well, if available
        if ( pos.hasAttribute(QtMobilitySubset::QGeoPositionInfo::HorizontalAccuracy) ) {
            std::cout << "    horizontal accuracy = " << (double)pos.attribute(QtMobilitySubset::QGeoPositionInfo::HorizontalAccuracy) << std::endl;
        }
    
    }
    // slot connected to the QGeoPositionInfoSource::updateTimeout() signal
    void ApplicationUI::positionUpdateTimeout()
    {
        std::cout << "timeout occurred" << std::endl;
    
        // On BlackBerry more information as to why the device timed out may be available:
        bb::location::PositionErrorCode::Type errorCode = bb::location::PositionErrorCode::None;
    
        if ( _source->property("replyErrorCode").isValid()  ) {
            errorCode = _source->property("replyErrorCode").value();
            if ( errorCode != bb::location::PositionErrorCode::None ) {
                std::cout << "    " << _source->property("replyErrStr").toString().toLatin1().constData() << std::endl;
            }
        }
    }
    

    And main.cpp looks like this:

    // Default empty project template
    #include 
    
    #include 
    #include 
    #include "applicationui.hpp"
    
    // include JS Debugger / CS Profiler enabler
    // this feature is enabled by default in the debug build only
    #include 
    
    using namespace bb::cascades;
    
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
        // this is where the server is started etc
        Application app(argc, argv);
    
        // localization support
        QTranslator translator;
        QString locale_string = QLocale().name();
        QString filename = QString( "SimpleLocation_%1" ).arg( locale_string );
        if (translator.load(filename, "app/native/qm")) {
            app.installTranslator( &translator );
        }
    
        ApplicationUI * appUI = new ApplicationUI(&app);
    
        appUI->startCellSiteUpdates();
    
        // we complete the transaction started in the app constructor and start the client event loop here
        return Application::exec();
        // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
    }
    

    Your file bar - descriptor.xml must contain this line to allow approval of the app for location-based services:

        access_location_services
    

    Also to ensure that location-based Services are enabled under settings on your device.

    Your .pro file should contain this line so that the QtLocationSubset library is linked:

    LIBS += -lQtLocationSubset
    

    I hope this helps!

    Jim

  • Extraction of signatures of the device database

    With version 5.1 (3) signatures are no longer in the command line. Is there a way to extract a list of configuration of the signature of the device in a readable format? Thank you in advance.

    BTW, Kudos to the team of Cisco IPS. 5.1 (3) is a big improvement on 4.1 (x).

    You can get it from the CLI by practice:

    config t

    Service signature-definition sig0

    view settings | include sig - id | subsig id | name - GIS

    You can change the list of parameters to include in order to change you want to see.

  • Security for the COD file question: is it possible to extract the BlackBerry devices .cod file?

    Is it possible to extract the BlackBerry devices .cod file?

    We want to ship the BlackBerry device with our application installed.

    I was wondering if need to add additional security.

    Installing drivers USB BlackBerry Desktop Manager, connect the BlackBerry to the PC via USB/Bluetooth and «save the JavaLoader.exe u your_module_here»

    PS JavaLoader.exe comes with the BlackBerry development Java (JDE) environment.

  • Support to properties of the device - GPS and WIFI

    Hello, I am developing an application and I would be taking in charge all models of devices with gps and wifi support. Is it possible to get information, if the device supports GPS and Wifi?

    What devices is touch screen, there is a class touch screen and an isSupported() method, which returns false, if the touch screen is not supported on the device. Is there a similar method for Gps and Wifi, too? I searched the web, but I can't find anything about this and I think that's not good filter device names to determine if the application should run or not. I would appreciate a quick response time to the app's short... Thanks in advance.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/832062/How_To _...

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=5752&query.ID=161...

  • BlackBerry Smartphones location of saved Text messages and downloads please as a desire to update the device software

    I have a Blackberry 9300. I noticed while testing option 'restore' in Blackberry Desktop Software 'Saved messages' is grey so not able to restore and downloaded programs were not included in the backup course so I'm delaying the update of the OS 6 bundle OS 6 bundle 1879 2949 until I can get these issues resolved. First of all, where are my saved text messages would be they located on the SD card? Secondly, where are the downloaded applications and how would bring him back, I should reinstall individually or is there a better method I guess updating the software of the device would eliminate any reference to them? Thanks in advance, Marcia

    willismc wrote:
    My problem, I think that will be most of the downloads and installations have been from the Blackberry web, although "My World" lists apps, I have only the option to remove and reinstall yet if I so choose. That's why I need to dig a little deeper on the aspect of the place here.

    To reinstall your applications, see this KB:

    • KB17625 How to install or transfer has already purchased apps from BlackBerry App World for BlackBerry smartphone

    You may also need to clear the cache of application AppWorld:

    1. open the App World

    2. go to my world

    3. follow one (and only one!) of these steps:

    3. for the BB keyboard-oriented - hold down the ALT key and press on, in the sequence R, then S, then T

    3B. for touch screen only BBs - hold the num-lock (! 123 button) so that it hangs and then press on, in the sequence 3, then 4, then)

    3 c for the most recent (e, g., OS6 and 7) BB s, see this KB:

    • KB24714 How to clear the cache of BlackBerry App World

    4 AppWorld must close

    5. If your BB locks after issuing clear cache, do a battery pull reboot

    6. return to AppWorld/MyWorld (it can be slow, while it re - sync).

    If (4) stage arrives not as described, then the empty the cache failed.

    willismc wrote:
    I was also interested to read your information on the primary database of smartphone that made me wonder if it was at this location that the saved text messages were built. I mention this as I save some of my text messages I can consult at any time by selecting 'View the Messages stored' in the menu messages text, which lists the emails and text messages, that you saved.

    The Interface of Messages is against the databases on the BB... Watch a saved messages can be as simple as a filter that is applied to display only those, but always from the same database. Also understand that the 'Messages' is a term Super set, with "email", "SMS", and other types of messages into subsets.

    willismc wrote:
    Saving messages electronic elsewhere are not a problem but saved SMS backup does not seem to be an option, why would I need to check this feature before upgrading the device software. Appreciate your answer to that one.

    As I said, I suspect saved SMS Messages to be a subset of the base of great set 'SMS Messages"together with the message 'saved' being a subset within this database.

    I can't answer definitively for you because I've never had the problem you are experiencing. You may need to test to know for sure.

    Good luck!

  • Map screen: assign the same GPS location to a 'rare' image group

    Let's a have a buch of photos that were taken in the same place at different times. The images are scattered throughout the fimstrip and might even belong to different collections in the same catalog (or even different catalogs?). What is the best way to assign the same GPS coordinates to all these photos using the map screen?

    Of course, the direct way to do is to carefully select all of these photos in the Filmstrip, and then click the desired location on the map. It is problematic for reasons more than one. First of all, it is difficult to scroll the whole band and choose the photos one by one. Second, if I acccidentally miss one or two photos, I have to start all over again.

    The best way would be a sort of copy / paste appproach: copy the desired location in the Clipboard (another image or directly from the map) and then paste it on the desired images one by one or, better, on groups of images. A feature that, at first seems promising in this respect is the field of text input on the right that contains the GPS coordinates in the form of text. It is editable, which means that I can copy the coordinates (as text) of an image and paste it in the same field from another image. However, this unfortunately does not guarantee that images will end up with identical locations: the image that received the new coordinates could (and will be) end up with a slightly different location in terms of the image of the "donor". This means that the coordinates are stored internally with a precision greater than their representation in the text entry field.

    So, what are the other options?

    In the grid, select the "donor" photo, and then ctrl-click to select the photos of 'recipient '. Then synchronize the metadata, including the GPS location and any other fields that you want to synchronize. It's the equivalent of copy and multiple - Lightroom paste.

    This works only in a single catalog. It will not work in several catalogs (which of course is one of the many reasons why many people use a single catalog for all of their photos)

Maybe you are looking for

  • Where are my emails?

    This morning the last update came on my Firefox, and when I opened my Thunderbird, he told me all about the changes in the new version, 38.0 but I can't get to my emails. All I have is the page with information about the changes, but I do not see whe

  • HP Elitebook 840 g3: HP Elitebook 840 g3 or Off to turn on a backlit keyboard

    Hello How can I turn on a keyboard backlit or Off? Thank you.

  • DisplayPort not answer &amp; causing the BlueScreens

    Dear HP team I bought two ProBook 6570 b as well as HP and four HP EliteDisplay E231 screens Docking Stations. My configuration is: The ProBooks are connected via Dockingstation and DisplayPort with two screens of each. I use a hub of MST of the Club

  • Delay time 4070 PXI DMM

    Hello I use a PXI-4070 DMM and DotNet "SoftwareTriggeredMultipointAcquisition" example I want to trigger the DMM4070 with the AuxTrig entry to the front of the instrument. This works very well, but how can I change the time out the of triigger? It is

  • T430 W7Pro: Solution Centre message said: Miss me the driver "qknfd".

    I am an exclamation point in the taskbar that brings me to the center of Lenovo's Solution, where I receive the message shown in the subject line. The buttons take me for Device Manager. I went through Device Manager and looked at all of the devices