Get the location of BlackBerry Maps

Hello

In the BlackBerry map pinpoint me a location, for example New York. I want to save this place in my store.

Can someone help me sort this

Thanks in advance

Jake

You can add an ApplicationMenuItem to the card program. When you menu item is selected, the location (lat/lon) is sent to your application.

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

Tags: BlackBerry Developers

Similar Questions

  • 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

  • Get the code of BlackBerry PIN through lines of command, or c# program

    Hi all

    Could you please suggest me the way to get the PIN of BlackBerry code through lines of command, or c# program. Either it's direct BlackBerry or BlackBerry device Simulator and which is connected by USB.

    You can use the javaloader.exe command-line tool to do this.  It is included with the JDE BlackBerry and BlackBerry Java plug-in for Eclipse.  The following command will do.

    JavaLoader u deviceinfo

  • Interrupted exception in getting the location?

    Hello..

    My application is running in the background that gets the location by gps and cellsite... It shows me interrupted exception when I run the application... How can I start the two wires together? is there a way... How to handle this exception?

    I added a while loop on it in the thread who sleep for 3 minutes and it works even if the condition is true for cellsite and it works when I run both when I run one of them...

    but know not at the moment... I don't know the exception management as well... I just called wire cellsite except thread so gps location when gps does not provide the place or has expired at this time, it executes the cellsite thread... I do not know may be it can cause any problem after...

  • How to get the Version of Blackberry Messenger in webworks

    I would like to know if its possible for me to get the version of Blackberry Messenger installed on Blackbery device from my application webworks.

    I need to know how to do that because I intend to connect my blackberry webworks for BBM 6 application. So I need to know if the user has version 6, so I can tell them to upgrade if it is not.

    Thank you


  • Possible to send location for BlackBerry maps using the cards: / / URI?

    I was wondering, since we can launch BlackBerry maps maps: / / is there a way that we could send a location for maps of the URL?

    As maps://Kingston-Upon-Hull

    You can use ' geo:,' uri without the ' / /'.

    For example, this url should get you close to where I live:
    Geo:46.29, - 72.66

  • Display the current location on Blackberry Maps

    Hi all

    I have an application that displays a number of places on a map. I have create a situation with all the included sites document and then call blackberry maps. This all works fine, but I can't work on how to show the current location of the user and the sites that I spent in.

    Ideally, I would like to the user's location to display a small blue mark (like it on google maps) and sites to display as normal red pawns. Is this possible?

    Otherwise, I thought to put the current location in the rental document (which I did successfully for more information getRoute) but how then the user distinguished between their situation and sites? Is it possible to create custom pins?

    MapField gives you the opportunity to paint your own markers. I suggest that you look on this.

  • Get the location with the name of the city and the country.

    Hi, can someone explain the logic behind this?
    Once we get the coordinate of the location using the gps, how do we use to get the name of the city or the country?

    In addition, what is the difference between 'Place' and "Gps Position" in the authorization?

    0o0o

    Here you will find more specific information:
    https://developer.BlackBerry.com/Cascades/reference/qtmobilitysubset__qgeosearchmanager.html#functio...

  • How to get the google - a route map?

    I have a google map that I included in a mobile site, when you click on the link that includes the latitude and longitude of the destination, it opens google maps, but it does not recognize the current location to create the directions from, though even I have the settings on my mobile device configured to allow the location.   Can you please help me find a way to get it so the person responsible for the search of the site can click on driving directions button that I put in place and it will calculate, for them, indications of their current location to the defined destination.

    Thank you!

    set up your route in google

    Click on the menu item and select share & embed map.

    Choose the short URL

    Copy the URL address

    In Muse, create a static image (maybe a graph of google map or what ever you decide to design) to use as the link and paste the code.

    Note: using the Google map widget Muse does not work for what you need to do.

  • How to get the code PIN Blackberry 10 using javascript for BB10 Webworks App?

    Hi all

    I have developed web application for blackberry 10 using the emulator to ripple and Blackberry 10 Webworks SDK 1.0.4.11.Here I put the automatic connection of my web application... So I want to get the Pin 10 of Blackberry number using javascript... Please help me... Someone knows... Thank you very much...

    Kind regards

    Marimuthu_P

    Which is documented here for WebWorks 2.0: https://developer.blackberry.com/html5/apis/beta/blackberry.identity.html#jbo1385148789774

    and here for WebWorks 1.0:

    https://developer.BlackBerry.com/HTML5/APIs/gold/BlackBerry.identity.html

    You want the uuid property.

  • Doubt about the appeal of Blackberry Maps

    Hello.

    I'm developing an application that uses Invoke to call the Blackberry Maps appwhile by the way some places defined by the user.

    My question is this, citing Blackberry Maps will cause my original application of 'freeze' until I close BB Maps, or it will not interfere and my application will run in the background while I use BB maps?

    Thanks in advance.

    Your application will be in the background and will no longer receive events from the user interface, but you can always perform a treatment from other threads.

  • Is there a way to get the owner of BlackBerry phone to the BlackBerry browser number?

    We are trying to identify the user by their BlackBerry phone number in a web application Java running on a WebSphere version 6.1 application server (JDK5.0). BlackBerry users access the application through BlackBerry browser. Is it possible to get the phone from the owner of the number with type of JavaScript code and pass the phone back number to the Web server? Has anyone done this type of programming?

    We use curve and BlackBerry Torch.

    Thank you in advance.

    It is not possible to read the phone number of the user of the BlackBerry browser application.  There is no object of JavaScript in the context of the browser which allows a web site to access this type of information (or the browser exposes this info).

    However, during the incorporation of an object browser in a Java application (for example using the framework WebWorks, or creating an application of Java-Web hybrid from scratch), you have the ability to access the necessary telephone API which allows you to read the active phone number.

    One suggestion would be to create a BlackBerry application using the WebWorks platform, which support your JSP page.  Your users then install and use this client on their BlackBerry (instead to access the content via the browser), and then you can use device API such as the phone API to add functionality for your application.

    Sincerely,

    Adam

  • With regard to the bug in Blackberry Maps

    Hello

    Does anyone know how to change the color of Push-Pin in Blackberry Maps.

    Regarding

    Surfaces Sharma

    Use MapField and draw your own PIN.

    See MapFieldDemo in the distribution of JDE 4.7.

  • get the location of the configuration file for each virtual in a cluster

    Is there way in the cli of power for a list of the location of each file in the configuration of the virtual machines in a cluster?  or even each file configuration on data warehouses?

    Thank you

    For all the virtual machines on the VIServer (s) connected

    Get - VM | Select Name, @{N = "VM Config file"; {E = {$_.extensiondata.config.files.vmpathname}}
    Or if you just want to a single data store
    Get-Datastore | Get - VM | Select Name, @{N = "VM Config file"; {E = {$_.extensiondata.config.files.vmpathname}}
    Replace with the data store you want to run it against, for example to run it against Datastore01
    Get-Datastore Datastore01 | Get - VM | Select Name, @{N = "VM Config file"; {E = {$_.extensiondata.config.files.vmpathname}}
  • Get the location of an annotation

    I am looking for the location coordinates / annotation and print.

    I can get the annotation and seem to even get contact information, but can not print them.

    That's what I'm looking for:

    Box ASFixedRect;

    PDAnnotGetRect (annot, & box);

    PTR = (char *) & box.left;

    sprintf (buf, "location of the annotation is %s", ptr ");

    AVAlertNote (buf);

    Thank you

    Tyler

    You must fill in the Member redactionProps.size the sizeof (PDRedactParams)

Maybe you are looking for