RouteMapInvoker is not a type - work on Simulator not on Q10

I tried to test my app on my new Q10 (10.1.0.4211) and the application does not start. In the Console output, I see the error:

BB::Cascades:QmlDocument: error loading QML of: QUrl ("asset:///main.qml")
-errors: (asset:///main.qml:43:9: asset:///EventsPage.qml:148:9 not available, Type EventsPage: RouteMapInvoker is not a type)

The EventsPage has a viewlist of events and you can use the menu command to call the map for directions.

I used the example of the RouteMapInvoker documentation to create my version.

Again, this works in the Simulator, so I was very surprised to get this error on the device.  The RouteMapInvoker has been available since 10.0.0, so it should work on a 10.1.0 device.

I made sure that I added LIBS +=-lbbplatform to the .pro file, checked the location of Access Services in the .bar file and importing the class bb.platform 1.0.

Any suggestions?

The EventPage.qml

import bb.cascades 1.0
import bb.system 1.0
import bb.platform 1.0
import MeetupServices 1.0

Page {
    property bool hasLocation:false;
    property string locationName;
    Container {
        ActivityIndicator {
            objectName: "aiEvents"
            id: aiEvents
            preferredWidth: 100
        }
        Header {
            id: hMeetupEvents
            // Localized text with the dynamic translation and locale updates support
            title: qsTr("Meetup Events") + Retranslate.onLocaleOrLanguageChanged
            subtitle: qsTr("Upcoming events you have RSVP'd for")
        }

        SegmentedControl {
            id: rsvpOptions
            Option {
                id: optionYes
                text: "Yes"
                value: "YES"
                selected: true
            }
            Option {
                id: optionNo
                text: "No"
                value: "NO"
            }
            Option {
                id: optionNone
                text: "None"
                value: "NONE"
            }
            onSelectedIndexChanged: {
                var value = rsvpOptions.selectedValue
                console.debug("Selected value: " + value);
                meetupWS.filterEvents(value);
            }
        }
        ListView {
            id: lvMeetupEvents
            objectName: "lvMeetupEvents"
            listItemComponents: ListItemComponent {
                type: "item"
                Container {
                    id: itemRoot

                    Label { text: ListItemData.title
                        multiline: true
                    }
                    Label { text: qsTr("at " + ListItemData.eventhour)
                    }
                    Label { text: ListItemData.description }
                    Container {
                        background: Color.create("#ffffff")
                        Label { text: ListItemData.group
                            textStyle.color: Color.Red
                            multiline: true
                        }
                    }
                }

            }
            onTriggered: {
                console.log("selected : " + indexPath);
                clearSelection();
                toggleSelection(indexPath);

                routeInvokerID.resetEndLatitude();
                routeInvokerID.resetEndLongitude();
                routeInvokerID.resetEndName();
                routeInvokerID.resetEndName();
                routeInvokerID.resetEndAddress();

                var selectedItem = lvMeetupEvents.dataModel.data(indexPath);
                locationName = selectedItem.venue_name.toString();

                if(locationName.length > 0) {
                    hasLocation = true;
                } else {
                    hasLocation = false;
                }

                if(hasLocation) {
                    routeInvokerID.setEndName(selectedItem.venue_name.toString());
                    routeInvokerID.setEndDescription("Meetup Location");
                    routeInvokerID.setEndAddress(selectedItem.venue_address_1 + " "
                        + selectedItem.venue_city + ", "
                        + selectedItem.venue_state + " "
                        + selectedItem.venue_zip);
                    routeInvokerID.setEndLatitude(parseFloat(selectedItem.venue_lat.toString()));
                    routeInvokerID.setEndLongitude(parseFloat(selectedItem.venue_lon.toString()));
                }
            }
            contextActions: [
                ActionSet {
                    ActionItem {title: "Map Location"
                        imageSource: "asset:///images/Map.png"
                        onTriggered: {
                            if(hasLocation) {
                                routeInvokerID.go();
                             } else {
                                 eventsToast.body = "No Location";
                                 eventsToast.show();
                             }
                        }
                    }
                    ActionItem {title: "Change RSVP"
                        imageSource: "asset:///images/edit_rsvp.png"
                    }
                }
            ]
        }
    }
    function refreshData() {
        meetupWS.eventsDataRetrieved.connect(dataLoading);
        meetupWS.eventsDataGet.connect(dataLoading)

        // get
        meetupWS.getSelf("events");
    }
    function dataLoading() {
        if(aiEvents.running) {
            aiEvents.stop();
        } else {
            aiEvents.start();
        }
    }
    actions: [
        ActionItem {
            title: "Refresh"
            onTriggered: refreshData()
            ActionBar.placement: ActionBarPlacement.InOverflow
            imageSource: "asset:///images/Reload.png"
        }
    ]
    attachedObjects: [
        SystemToast {
            id: eventsToast
            body: "Meetup Events data loading"
        },
        RouteMapInvoker {
            id: routeInvokerID

            // Raleigh as starting location // remove when done
            startLatitude    : 35.786627       // Raleigh latitude
            startLongitude   : -78.660965      // Raleigh longitude
            startName        : "Raleigh, NC"
            startDescription : "North Carolina's capital"

        },
        MeetupServices {
            id: meetupWS
        }
    ]
}

did you declare you in your main.cpp like this?

#include 

under the present law:

Q_DECL_EXPORT int main(int argc, char **argv)
{

Insert this code so that the routeMapInvoker can be called in the QML:

qmlRegisterType("bb.platform", 1, 0, "RouteMapInvoker");
        bb::data::DataSource::registerQmlTypes();

Tags: BlackBerry Developers

Similar Questions

  • Send the log file only works on Simulator

    Hello together,

    I added the ability for our users to send a log file of the application for me (author). Its a business application. We have now deployed version and now the log file is NOT attached to the email.

    The code I am using:

    void ApplicationUI::sendLogfile()
    {
        InvokeRequest request;
        request.setAction("bb.action.COMPOSE");
        request.setMimeType("message/rfc822");
        QVariantMap data;
        data["to"] = (QVariantList() << "[email protected]" << "[email protected]");
        data["subject"] = "ceAuToApp Logdatei";
        QString fileName = QString("log.txt.%1").arg(QDate::currentDate().toString("yyyy-MM-dd"));
        QString filePath = QString("logs/%1").arg(fileName);
        QString logpath = QString("shared/misc/%1").arg(fileName);
        QFile::remove(logpath);
        QFile::copy(filePath,logpath);
        QString logpathEncoded = QString(QUrl(logpath).toEncoded());
        data["attachment"] = (QVariantList() << logpathEncoded);
        QVariantMap moreData;
        moreData["data"] = data;
        bool ok;
        request.setData(bb::PpsObject::encode(moreData, &ok));
        InvokeManager manager;
        manager.invoke(request);
    }
    

    QML:

    Button {
                text: qsTr("Logdatei an Entwickler senden")
                onClicked: {
                    _ApplicationUI.sendLogfile()
                }
                horizontalAlignment: HorizontalAlignment.Center
            }
    

    Any ideas why it works on Simulator as well as on the device (running in developer mode) but not within the company? Thanks for your help.

    Sven

    He got together with the following code:

    void ApplicationUI::sendLogfile()
    {
        InvokeRequest request;
        request.setAction("bb.action.COMPOSE");
        request.setMimeType("message/rfc822");
        QVariantMap data;
        data["to"] = (QVariantList() << "[email protected]" << "[email protected]");
        data["subject"] = "ceAuToApp Logdatei";
        QString fileName = QString("log.txt.%1").arg(QDate::currentDate().toString("yyyy-MM-dd"));
        QString filePath = QDir::currentPath() + QDir::separator() + QString("logs/%1").arg(fileName);
        QString logpath = QDir::currentPath() + QDir::separator() + QString("shared/misc/%1").arg(fileName);
        QFile::remove(logpath);
        QFile::copy(filePath,logpath);
        QString logpathEncoded = QString(QUrl(logpath).toEncoded());
        data["attachment"] = (QVariantList() << logpathEncoded);
        QVariantMap moreData;
        moreData["data"] = data;
        bool ok;
        request.setData(bb::PpsObject::encode(moreData, &ok));
        InvokeManager manager;
        manager.invoke(request);
    }
    
  • parallel port programmer (former type worked well in older systems) displys communication error.

    Hello my parallel port programmer (former type worked well in older systems) communication error displys in my last pc having the fastest perfomance.

    Hello

    Follow the steps in this link:

    http://www.Cypress.com/?app=Forum&rID=49672

    Let us know the results.

  • WHY ILLUSTRATOR WOULD STOP ALLOWING ME TO 'DEVELOP' TYPE - WORKED A MINUTE AGO

    WHY ILLUSTRATOR WOULD STOP ALLOWING ME TO 'DEVELOP' TYPE - WORKED A MINUTE AGO

    Could you describe better text rather than develop it, it's faster!

    Use 'expansion' on stroke or complex objects containing the type, stroke, effects...

  • jQuery Mobile app does not work on OS5 telephone, but works in Simulator

    Hello

    I'm trying to run a simple jQuery Mobile (beta2) app on my phone and its does not work.

    Had been a working app and it worked on the Simulator, but didn't have a screen on the phone Curve8900.

    Then I created a simple jQuery Mobile app that displays a header, content (with listview) and the foot.

    When I insert in the Simulator, it looks fine, but when I charge the phone it loads and displays a white screen with a small gray square at the top left of the screen... (perhaps 30 x 30 pixels or less)

    (the rest of the screen is green, because I put the bottom in the config.xml file to green)

    I've specified:

    
    

    and also I tried using:

            addEventListener('load', doLoad, false);
    
            function doLoad() {
                document.body.style.height = screen.height + 'px';
                alert('initPage 3');
            }
    

    but makes no difference.

    (Before I added jQuery to app it worked fine)-very tedious debug because I need to sign the code every time I have test and restart the phone after the installation

    Any help appreciated.

    Maybe someone has a skeleton jQueryMobile app that works on OS5?

    Hi Heiko,

    According to this example JQuery 1.5.2 seems to work on 5.0. Do you need a feature of 1.6.2 otherwise maybe try this library instead.

  • SQLite can insert but not select - work in Simulator

    BlackBerry Java plug-in for Eclipse Version: 1.5.0
    Built with OS 6

    Device with OS 7.1 9930

    The title basically sums it up.

    I am able to create a database, create the table and insert values into the table.  In the Simulator, the select statement to display the data works.  But when I try to debug on the device, the select statement returns with an empty cursor.

    I installed the Manager of SQLite in FireFox, so I am able to stop debugging and veryify that the database on the SD card in the device exists and that he has made.  In fact, apparently, whenever I tried to debug, it would be just to reinsert the records.

    Because I thought it might be an opening and closing of the issue of the database, I give the floor to open the database for the insert and select.  I'm sure it's something simple escapes me, but I can't understand why it works on the Simulator, but not on the device.

    The Insert statement

    public static void insert(String name, String value, Database db) throws DatabaseException
        {
            try
            {
                // Open Database
                db = DatabaseFactory.open(appAttributes.dbName);
                // INSERT a row into the Category table for the new category
                Statement statement = db.createStatement("INSERT INTO " + tableName + "(name, value) VALUES(?, ?)");
                statement.prepare();
                statement.bind(1, name);
                statement.bind(2, value);
                statement.execute();
                statement.close(); 
    
                db.close();
            }
            catch(DatabaseException dbe)
            {
                SDApp.errorDialog(dbe.toString());
            }
        }
    

    The select statement

    public static String getValueByName(String name, Database db)
        {
            String thisValue = null;
    
            try
            {
                //Open Database
                db = DatabaseFactory.open(appAttributes.dbName);
                // Read in all records from the Category table
                Statement statement = db.createStatement("SELECT name, value FROM " + tableName + " WHERE name = ?");
                statement.prepare();
                statement.bind(1, name);
                Cursor cursor = statement.getCursor();
                Row row;
    
                if(cursor.isEmpty()){
                    thisValue = "Cursor Is Empty";
                } else {
                    cursor.first();
                    row = cursor.getRow();
                    thisValue = row.getString(1);
                }
    
                statement.close();
                cursor.close();
                // Close Database
                db.close();
            }
            catch(DatabaseException dbe)
            {
                SDApp.errorDialog(dbe.toString());
            }
            catch(DataTypeException dte)
            {
                SDApp.errorDialog(dte.toString());
            }
    
            return thisValue;
        }
    

    Okay, I found the solution.

    Apparently, the example should not be taken exactly.  This blog post on the use of SQLite , I found that you need to open the database, but it will not close until you close the application.  And then just call the same database open initially for all other calls reporting.

  • [Widget] createNewDir not working in Simulator/device?

    Hello

    I have a simple example Widget

    index.htm

    
    
        
            
            Untitled Page
            
        
        
        
    
        
    
    

    config. XML

    
    http://www.blackberry.com/ns/widgets" version="1.0.0" rim:header="RIM-Widget:rim/widget" xmlns="http://www.w3.org/ns/widgets">
      My Widget
      
      Me
      
      
      
      
      
      
    
    

    I tested the widget in the Simulator (BOLD 9700 5.0.0.54 5 credits) and on a real device "BOLD" 5.0.0.41 900-1, but the record not be created. What I am doing wrong ?

    Hello

    The path should be "file:///store/home/user/MyFolder/" (including the slash at the end).

  • Blocking attachment file type works do not email.

    Tried to set up the blocking of attachments with a .docm file type. Followed these old instructions to support.software.dell.com/kb/sw8351 tested with a file with a .docm file type, attached to the email and the email always happens with the .docm file attached and the Interior is still intact.

    We test this using a TZ 105 with the latest firmware.

    Any ideas would be appreciated, thanks.

    The fixed. Lack of checking "enable the App rules:

  • How to type work of casting for string to U16

    Hello

    Sorry for typing on the same subject, but I still don't understant what do happen when I type the 2-byte in U16 distribution chain. Could you please explain me this?

    Kind regards

    __behemot_

    Hello

    All ASCII characters are represented by 8 bits in memory. If you imagine these 8 bits, you can concatenate the. Who will be the 16-bit long integer (in this case, when you have a chain of 2 elements) and of course not signed, because there is no defined sign in ASCII values.

    So the two integers and character are represented in the same way in the memory, but LabVIEW knows what type is stored in variable. If you working with ASCII characters you'd have numbers, you must convert it in full then you can multiply it and etc. For example, if you want to change 'a' to 'A', you can convert it to integer U8 you must subtract 20 from her and typecast to character (string 1 element).

    I hope that this will help you understand the type cast. If you have any other questions, please write again.

    Kind regards

    Peter

  • Getting Microsoft 2004 - Century of flight-graffics working Flight Simulator...

    Just bought a Dell vostro 220.  Said that I would have no problem with my flight simulator.  It has been uninstalled and reinstalled four times.  The graffics is undesirable.  He can't fly VFR.  The video card has been interlaced outside, and this isn't the answer.  I need a fix... Please, I beg you!   Bill

    What type of video card you have in the system?

    Here's a thread on what vid cards you should use to get the best FPS at best settings.

    http://www.TomsHardware.com/Forum/243202-33-Flight-Simulator-video-card

    MCP. MCDST. LVL 80

  • can't see MP3 disc on the CD/DVD drive - I just see it file and no disc displayed. There is no error message; all other disks, file types work very well!

    And I already tried the MS Utility to solve this problem.  She could not do - he asked me to insert a readable disc (when he could not see the MP3), so insert another disc that was readable.  Completed the "patches" then the last section inquire whether or not the problem was resolved in effect, I answered no.  I did have success as a result of the Microsoft community' suggestion that he left me with.

    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    You have this problem with just this one CD?

    The CD may be damaged or dirty. Some readers may handle these CDs better than others, so it is perfectly possible that a player can still play the CD, while others do not. I suggest that you create a new copy of the CD on an other machines it can still be read.

  • Q10 BlackBerry HELP! Delete message no longer works in the hub on Q10

    Touch and hold to select and delete a message from BB hub (i.e. without opening the message) on my Q10 suddenly stopped working! Not sure when it stopped working exactly - only during the last week or two--and the only one * possible change lately, I did is upgraded BBM... but I'm not using BBM so I highly doubt it's that. My software is perfectly up to date and I tried power and turn it back on. No luck. I looked at all the advice and manuals, and forums and can not see all the settings I could have disconnected by inadvertence or anyone else having the same problem.

    Someone at - it suggestions? We believe that it is a hardware or software problem? (Except that I excluded material because there is no other problem with my touch screen feature).

    Any help most welcome!

    Karen

    Try a reboot by removing the battery.

  • BlackBerry software link does not not wireless Q10

    I use Q10 BB with the link 1.1.037

    Everything worked perfectly - syching wireless

    Now, it's all stopped - when I plug BBery via USB cable - all the content is there, but when I unplug the device, it shows as a device not connected and I can't link to talk to him in the absence of the cable is connected...

    I tried refreshing, withdrawal of device, restart the PC...

    any ideas?

    Hey marcus_anselm,

    Welcome to the community of BlackBerry Support Forums.

    Thanks for the question.

    Just to clarify, you are doing a Wi - Fi sync with your support?  Or a Bluetooth sync with your contacts or calendar?

    I look forward to your reply.

    See you soon.

  • Software link blackBerry will not update Q10

    Hi everyone, attempts to save my Q10 do not work on the link. It is said: "check that your device is turned on and connected to the Blackberry link and try again."

    Just device drivers all set to date, no conflict with Avast, Q10 is connected, will not recognize the Q10!

    I'm trying to update the operating system, but won't until I can save what is out there.

    No problems with the USB cable or port.

    Help?

    You should not lose anything that is backed up previously and it should be recognized, you are only updated version.

  • Simulation of JFET does not

    I can't for the life of me get JFETS to work in simulation - I have this circuit to the other on fully and completely closed. It uses a J177, resistance on listed on the data sheet of 300 ohms. Then, when I pass YDS 0V I can wait the tension on the FET to be divided evenly between the FET and resistance. When the door went to 15v Vgs is now positive, closing the FET and the overall voltage is on the FET.

    The FET never seems to turns on and the full supply voltage always shows on the display. Why is this?

    Hi pgo48,

    Unfortunately, the J177 component is a single component of page layout, so it doesn't have a simulation model. Green color code by default for a single component of page layout.

    The reason why these components exist is to help the PCB design. Simulation models are provided by the manufacturer, here is a link to a simulation for the J177 model.

    http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&RPN=MMBFJ177L

    You download the MMBFJ177LT1G_SP3_Models on the site and use the tutorial below to create the part for her.

    https://decibel.NI.com/content/groups/circuit/blog/2011/04/06/component-creation-101

    All the best,

Maybe you are looking for