Invocation of QML

Hello!

I read a lot of posts on ditch Invocation QML. A lot of questions seems related to a dynamic invocation. But even when the url is defined in the code I can not run. Here is my code:

 ImageView {
        id: actualAd
        objectName: "actualAd"
        image: adLoader.image
        horizontalAlignment: HorizontalAlignment.Fill
        verticalAlignment: VerticalAlignment.Fill
        scalingMethod: ScalingMethod.Fill
        onImageChanged: {
            fade.play();
        }
        gestureHandlers: [
            TapHandler {
                onTapped: {
                    invokeAdLink.trigger("bb.action.OPEN");
                }
            }
        ]
        attachedObjects: [
            Invocation {
                id: invokeAdLink
                query: {
                    uri:
                    "http://www.google.fr"
                    invokeTargetId:
                    "sys.browser"
                }
            }
        ]
    }

When I click the Image, nothing happens. Any idea?

It's a little hard to read because you don't use the code formatting feature (small 'C' icon in the editor), but try without a colon after "motion". Just do "application {uri :...}" and see if that helps.

Tags: BlackBerry Developers

Similar Questions

  • Invoke the BBM Message to PIN

    I need an example code or information on how to trigger a BBM Chat with on a particular PIN the ActionBar or a button.

    Any link reference or help would be greatly appreciated.

    Thank you!

    After this doc:

    https://developer.BlackBerry.com/native/documentation/device_platform/invocation/BBM.html

    As uri (pin:<>) is almost unique to BBM app, using only the uri in the InvokeRequest would work, but if another application to register this uri, you include better target ID and ID of action both to ensure that the application of the right is open.

    In addition, do not use class Invocation of QML, which is not the same class as InvokeManager and tends to fail in many cases, including this one.

    Main.QML

    import bb.cascades 1.4
    
    Page {
        Container {
            TextField {
                id: bbmPin
                hintText: "Enter BBM pin here"
                inputMode: TextFieldInputMode.Pin
                onTextChanging: { button.enabled = (text.length == 8) }
            }
            Button {
                id: button
                text: "Chat"
                enabled: bbmPin.text.length == 8
                onClicked: { _app.startBbmChat(bbmPin.text) }
            }
        }
    }
    

    ApplicationUI.cpp

    #include 
    #include 
    
    /* ... */
    
    void ApplicationUI::startBbmChat(const QString& pin) {
        bb::system::InvokeRequest request;
        request.setAction("bb.action.BBMCHAT");
        request.setTarget("sys.bbm.sharehandler");
        request.setUri("pin:" + pin);
    
        bb::system::InvokeManager invokeManager;
        invokeManager.invoke(request);
    }
    

    ApplicationUI.hpp

    /* ... */
    
    public:
        ApplicationUI();
        virtual ~ApplicationUI() {}
    
        Q_INVOKABLE void startBbmChat(const QString& pin);
    
    /* ... */
    
  • Share link

    Hi all

    I want to share a link to appworld (link to my app) using Invocation. My code (QML) is:

    Button {text: 'Share'}

    onClicked: {}

    invokeQuery.mimeType = "text/plain".
    invokeQuery.data = "try this app: < a="" href="\" appworld://content/xxxxxxxx\""=""> my app."
                        
    invokeQuery.updateQuery ();

    }

    ...

    attachedObjects:]

    {Of invocation
    ID: invokeShare
                   
    query: {InvokeQuery}
    ID: invokeQuery
    mimetype: "text/plain".
    }
    onArmed: {}
    If (invokeQuery.data! = "") {}
    Trigger ("BB.action.Share");
    }
    }
    } }

    But I get a clear text and I want that click of the user the link and be redirected to the appworld. How can I do?

    the invocation of QML has always been difficult and usually does never work except if used with an action context item.

    This can be done easily using c ++

    ApplicationUI.cpp

    #include 
    #include 
    
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
        qml->setContextProperty("cpp", this);
    
    void ApplicationUI::message()
    {
        QString text = "Download Dev Mode for Free in BlackBerry World!  http://appworld.blackberry.com/webstore/content/35407898";
    
        InvokeQuery *query = InvokeQuery::create()
            .mimeType("text/plain")
            .data(text.toUtf8());
        Invocation *invocation = Invocation::create(query);
        query->setParent(invocation); // destroy query with invocation
        invocation->setParent(this); // app can be destroyed before onFinished() is called
    
        connect(invocation, SIGNAL(armed()), this, SLOT(onArmed()));
        connect(invocation, SIGNAL(finished()), this, SLOT(onFinished()));
    }
    
    void ApplicationUI::onArmed() {
        Invocation *invocation = qobject_cast(sender());
        invocation->trigger("bb.action.SHARE");
    }
    
    void ApplicationUI::onFinished() {
        Invocation *invocation = qobject_cast(sender());
        invocation->deleteLater();
    }
    

    ApplicationUI.hpp

    namespace bb
    {
        namespace cascades
        {
            class Application;
            class Invocation;
        }
    }
    
    public:
            Q_INVOKABLE void message();
    
    public slots:
        Q_INVOKABLE void onFinished();
        Q_INVOKABLE void onArmed();
    

    QML

    Button {
       onClicked: {
             cpp.message();
       }
    }
    

    I didn't belive it is necessary, but if you have problems try adding this to your .pro compilation

    . Pro

    LIBS += -lbbsystem
    
  • Citing the BBM in qml

    Hello guys how are you

    I try to call bbm to open my bbm channel in qml, I'm stuck in these codes and I don't know what to do

    {ActionItem}
    Title: 'BBM CHANNEL. "
    imageSource: "asset:///icons/ic_notes.png."
    attachedObjects:]
    {InvokeActionItem}
    ID: bbm
    query {}
    invokeTargetId: "sys.bbm.channels.card.previewer".
    invokeActionId: "bb.action.OPENBBMCHANNEL".
    URI: "" bbmc:".
    }
    }
    ]
    onTriggered: {}

    }
    }

    I tried many things, but all of them didn't work

    Also I don't know how to trigger the call using onTriggered

    any help on this?

    Thanks a lot guys

    Please note that I am glad that I can help , what I did was simply using propety Invocation in an attachedObjects

    That's what I did

    {ActionItem}
    Title: "my string".
    imageSource: "asset:///icons/ic_bbm.png."
    attachedObjects:]
    {Of invocation
    ID: invokeBBMC
    query {}
    invokeTargetId: "sys.bbm.channels.card.previewer".
    URI: "bbmc:C002151A4".
    }
    }
    ]
    onTriggered: {}
    invokeBBMC.trigger ("bb.action.OPENBBMCHANNEL")
    }

    You can find more information, so that the implementation that c ++ here:

    https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__invocation.html

    Peace

  • Calling function in QML?

    Hi all

    I need to call invite to BBM while clicking on a qml button, I am attaching my code example, but it does not

    Button {
               text:"Invite"
               id: invite_button
                onClicked: {
                invokeQuery.updateQuery();
                 }
                  attachedObjects: [
                        InvokeActionItem {
                          id:invokeQuery
                          title: "Invite to BBM"
                         query {
                         invokeActionId:"bb.action.INVITEBBM"
                               uri: "pin:2100000A"
                          }
                        }
                      ]
                    }
    

    How can someone send me some solutions for this problem. ?

    Thank you

    Hi all

    I found a solution about the guest call to BBM at the click of a button, I can't go to invite page but can not able to send invitations by selecting contacts, here is my code

    Button {
                text: "Invite"
                onClicked: {
                    invokeQuery.uri = "pin:210000A"
                    invokeQuery.updateQuery();
                }
                attachedObjects: [
                    Invocation {
                        id: invokeShare
                        query: InvokeQuery {
                            id: invokeQuery
                        }
                        onArmed: {
                             trigger("bb.action.INVITEBBM");
    
                        }
                    }
                ]
            }
    

    Can someone send me solutions

  • C++ or integration of QML calendar event creation

    Hello

    I am currently trying to add calendar event creation integration in my application.

    I started using QML create here

    actions: [
            ActionItem {
                title: qsTr("Add To Calendar")
                imageSource: "asset:///IMG/ic_add_entry.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    invokeCalendar.trigger("bb.action.CREATE")
                }
            }
        ]
        attachedObjects: [
            Invocation {
                id: invokeCalendar
                query {
                    //According to BlackBerry, this doesn't work so I need to find a workaround
                    mimeType: "text/calendar"
                    invokeActionId: "bb.action.CREATE"
                    invokeTargetId: "sys.pim.calendar.viewer.eventcreate"
                }
            }
        ]
    

    After the application of the above code, I discovered that nothing happened when the actionitem was activated; so, I asked him it with BlackBerry and it turns out that they couldn't make it work either.

    So, last week I tried various methods on how to integrate calendar functionality in my application. I tried the examples here and here , but could not get either to work due to several errors.

    Ideally, I would like to be able to define the: subject, body and the hour of beginning, all QML, but after searching the calendar I don't think I can.

    import bb.cascades 1.0
    
    Page {
        property alias fixtureInfo: fixtureText.text
        property alias dateInfo: dateText.text
        property alias timeInfo: timeText.text
        property alias timeZone: timeZoneText.text
        property alias stadiumInfo: stadiumText.text
        titleBar: TitleBar {
            // Localized text with the dynamic translation and locale updates support
            title: qsTr("Fixture") + Retranslate.onLocaleOrLanguageChanged
            scrollBehavior: TitleBarScrollBehavior.Sticky
        }
        ScrollView {
            id: scrollView
            scrollViewProperties {
                scrollMode: ScrollMode.Vertical
                pinchToZoomEnabled: true
            }
            Container {
                id: mainContainer
                Header {
                    title: qsTr("Teams Playing")
                }
                Container {
                    leftPadding: 20
                    rightPadding: 20
                    Label {
                        id: fixtureText
                        multiline: true
                        textStyle.base: bodyStyle.style
                    }
                }
                Divider {
                }
                Header {
                    title: qsTr("Date")
                }
                Container {
                    leftPadding: 20
                    rightPadding: 20
                    Label {
                        id: dateText
                        multiline: true
                        textStyle.base: bodyStyle.style
                    }
                }
                Divider {
                }
                Header {
                    title: qsTr("Time (GMT - 3)")
                }
                Container {
                    leftPadding: 20
                    rightPadding: 20
                    Label {
                        id: timeText
                        multiline: true
                        textStyle.base: bodyStyle.style
                    }
                }
                Divider {
                }
                Header {
                    title: qsTr("Time (My Timezone)")
                }
                Container {
                    leftPadding: 20
                    rightPadding: 20
                    Label {
                        id: timeZoneText
                        multiline: true
                        textStyle.base: bodyStyle.style
                    }
                }
                Divider {
                }
                Header {
                    title: qsTr("Stadium")
                }
                Container {
                    leftPadding: 20
                    rightPadding: 20
                    Label {
                        id: stadiumText
                        multiline: true
                        textStyle.base: bodyStyle.style
                    }
                }
                Divider {
                }
                attachedObjects: [
                    TextStyleDefinition {
                        id: bodyStyle
                        base: SystemDefaults.TextStyles.BodyText
                    }
                ]
            }
        }
        actions: [
            ActionItem {
                title: qsTr("Add To Calendar")
                imageSource: "asset:///IMG/ic_add_entry.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    invokeCalendar.trigger("bb.action.CREATE")
                }
            },
            ActionItem {
                title: qsTr("Share")
                imageSource: "asset:///IMG/ic_share.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    shareAction.trigger("bb.action.SHARE")
                }
            },
            ActionItem {
                title: qsTr("Search For Live Score")
                imageSource: "asset:///IMG/ic_search.png"
                ActionBar.placement: ActionBarPlacement.InOverflow
    
                onTriggered: {
                    var searchpage = goToSearch.createObject();
                    navigationPane1.push(searchpage);
                    searchpage.searchText("live score for " + fixtureText.text)
                }
            }
        ]
        attachedObjects: [
            ComponentDefinition {
                id: goToSearch
                source: "webView.qml"
            },
            Invocation {
                id: invokeCalendar
                query {
                    mimeType: "text/calendar"
                    invokeActionId: "bb.action.CREATE"
                    invokeTargetId: "sys.pim.calendar.viewer.eventcreate"
                }
            },
            Invocation {
                id: shareAction
                query.mimeType: "text/plain"
                query.invokeActionId: "bb.action.SHARE"
                query.data: fixtureText.text + qsTr(" at ") + timeText.text + qsTr(", ") + timeZoneText.text + qsTr(" in my time zone,") + qsTr(" on ") + dateText.text + qsTr(" in the ") + stadiumText.text + " via @TundraCore #WorldCup2014"
                query.onQueryChanged: {
                    query.updateQuery()
                }
            }
        ]
    }
    

    As you can see I'm using aliases, in the above code and so I want to put the following text:

    -Set the title of the event: "World Cup 2014:"+ fixtureText.text ".
    -Define the body as: fixtureText.text + 'to' + timeZoneText.text + 'on' + dateText.text + "in the" + stadiumText.text
    -Set the release date: dateText.text
    -Set as start time: timeZoneText.text

    Therefore, I was wondering if someone would be able to show me how to do this in QML or C++?

    Thanks in advance

    With the help of two other developers, I managed to get this working through QML my hpp file settings

  • Invocation of c ++

    Since the method invocations on part QML is currently defective (deliberately or not) I find myself with c ++

    void MyApp::share(QString name, QString surname, QString age)
    {
         printf("Share invoked");
    
         m_pInvocation = Invocation::create(
              InvokeQuery::create()
               .parent(this)
               .mimeType("text/plain")
               .data(name.toUtf8() + surname.toUtf8() + age.toUtf8()));
          QObject::connect(m_pInvocation, SIGNAL(armed()),
            this, SLOT(onArmed()));
          QObject::connect(m_pInvocation, SIGNAL(finished()),
            m_pInvocation, SLOT(deleteLater()));
    }
    
    // Declare the following method as SLOT on your .hpp file
    void MyApp::onArmed() {
        m_pInvocation->trigger("bb.action.SHARE");
    }
    

    found a few samples & this one is the most relevant to what I need, but it's when I try to report the call in my all I get

    'Invocation' does not designate a type

    private:
        Invocation* m_pInvocation;
    

    I have included in my .cpp

    #include
    #include

    In all add them before the class declaration:

    bb namespace {namespace stunts {class Invocation ;}}}

    The declaration should look like this:

    private:
    BB::Cascades:invocation * m_pInvocation;

  • Unbound invocation open the target application selection worksheet.

    Hello

    I'm looking to create an invocation to share a link, but also a picture. I want to open a worksheet that contains apps to draw in order to share an item.

    Q_INVOKABLE void DataItemModel::shareImageUrl() const
    {
     bb::system::InvokeManager manager;
     bb::system::InvokeRequest request;
     request.setAction("bb.action.SHARE");
     request.setMimeType("text/plain");
     request.setData( this->getShareUrl().toUtf8() );
     manager.invoke(request);
    }
    
    Q_INVOKABLE void DataItemModel::shareImage() const
    {
        QString dir = QDir::tempPath() + "/image.jpeg";
        QFile file(dir);        // Saving the image to the file system because the invocation requires it. My images are    downloaded and kept in memory only
        if (file.open(QIODevice::WriteOnly))
        {
            file.write(m_image->getRawImageData());
        }
    
        bb::system::InvokeManager manager;
        bb::system::InvokeRequest request;
    
        request.setAction("bb.action.SHARE");
        request.setMimeType("image/jpeg");
        request.setUri("file://" + dir);
    
        manager.invoke(request);
    }
    

    Here's how I call from QML

                  //Inside a ListView...
                 listItemComponents: [
                     ListItemComponent {
                         type: "item"
                         DataItem {
                             contextActions: [
                                 ActionSet {
                                     ActionItem {
                                         title: qsTr("Share image url")
                                         onTriggered: {
                                             ListItemData.shareImageUrl();
                                         }
                                     }
                                     ActionItem {
                                         title: qsTr("Share image")
                                         onTriggered: {
                                             ListItemData.shareImage();
                                         }
                                     }
                                 }
                           ]
                     ]
    

    In both cases, it only starts the BBM application.

    Since it is a unrelated call, I would expect sheet of selection of the app to show where I could choose NFC Bluetooth, messaging, Facebook, etc. and the plethora of other applications that support sharing.

    To aggravate something like it for a sharing URL works from QML (I wasn't able to share an Image this way via QML however). He opened a sheet with a list of applications in the choice. It is totally confusing, because it seems to be the exact thing I've done in C++.

                                   InvokeActionItem {
                                        query {
                                            mimeType: "text/plain"
                                            invokeActionId: "bb.action.SHARE"
                                        }
                                        onTriggered: {
                                            data = ListItemData.shareUrl
                                        }
                                    }
    

    How would open the worksheet selection app using the framework of the call?

    I had this problem as well a couple of weeks and solved it. When you call and independent, the system will select a logon request. You is better to use a call related, but do not specify a target.

    QString path = QDir::current().absoluteFilePath("shared/photos/avatar.jpg");
    m_pInvocation = Invocation::create(InvokeQuery::create().parent(this).mimeType("image/png").uri(QUrl::fromLocalFile(path)));
    
    m_pInvocation.trigger("bb.action.SHARE");
    
  • Invocation of the map

    Hello

    I am trying to use a card to add a calendar event, but my code below does nothing.

        actions: [
            ActionItem {
                title: qsTr("Add To Calendar")
                imageSource: "asset:///IMG/ic_add_entry.png"
                ActionBar.placement: ActionBarPlacement.OnBar
    
                onTriggered: {
                    invokeCalendar.trigger("bb.action.CREATE")
                }
            }
        ]
        attachedObjects: [
            Invocation {
                id: invokeCalendar
                query {
                    mimeType: "text/calendar"
                    invokeActionId: "bb.action.CREATE"
                    invokeTargetId: "sys.pim.calendar.viewer.eventcreate"
                }
            }
        ]
    

    If possible, I would like to prefil the subject, body and time of the event.

    I looked at Brian Scheirer code: http://bbcascadescode.tumblr.com/post/39391083442/new-calendar-year but I could not make it work either in level API 10.1 or 10.2, so I'll try to simply create a map on his own in QML instead.

    Any help would be great.

    Thank you

    Yes, I see the same thing. You may have found a bug, log on the developer Issue Tracker: SAID

    For now, I would recommend that you configure invocation in C++, as the examples in repo presentation Invoker calendar

  • Invite the BBM C++ invocation

    Hello

    the following segment isn' work.  I tried it in QML with the same results, so instead tried to do in C++, but I get the following error?

    > InvocationPrivate:nQueryResolved: no matching result query, no armed signal sent.

    Here's the code sniplet... :

    URI passed is a valid PIN, i.e. uri = QUrl("pin:")

    void ApplicationUI::sendBBMInvite(QString uri) {
    
        invocation = Invocation::create(
                InvokeQuery::create().parent(this).uri(uri).invokeTargetId("sys.bbm.sharehandler"));
    
        connect(invocation, SIGNAL(armed()), this, SLOT(onArmedBBMInvite()));
        connect(invocation, SIGNAL(finished()), invocation, SLOT(deleteLater()));
    
    }
    
    void ApplicationUI::onArmedBBMInvite() {
        invocation->trigger("bb.action.INVITEBBM");
    }
    

    Hello

    just figureed out...

    changed: and now works fine...

    void ApplicationUI::sendBBMInvite(QString uri) {
    
        invocation = Invocation::create(
                InvokeQuery::create().parent(this).uri(uri).invokeActionId("bb.action.INVITEBBM"));
    
        connect(invocation, SIGNAL(armed()), this, SLOT(onArmedBBMInvite()));
        connect(invocation, SIGNAL(finished()), invocation, SLOT(deleteLater()));
    
    }
    
  • Connect the signal in the C++ QML?

    Hello

    Sorry in advance for this noobish question

    My QML, I'd like to call C++ function to call the camera and then on the saved photo, I would like to save the url for further processing.

    The invocation and the seizure of the URL does not work correctly.

    The problem is that I can't send a signal of C++ to QML to send the url to QML for further processing.

    Trigger from QML:
    
    Button {
       text: "Snapshot"
       onClicked: {
        app.invokeCamera();
       }
    }
    
    void App::invokeCamera() {
        InvokeRequest request;
        request.setTarget("sys.camera.card");
        request.setAction("bb.action.CAPTURE");
        QByteArray data;
        data.append("full");
        request.setData(getShareRecipeData());
        mInvokeManager->invoke(request);
    }
    
    void App::childCardDone(
            const bb::system::CardDoneMessage &doneMessage) {
        QString url = "";
        qDebug() << "childCardDone reason:" << doneMessage.reason();
        qDebug() << "childCardDone data:" << doneMessage.data();
    
        if (doneMessage.reason().compare("save") == 0) {
            url = "file://" + doneMessage.data();
        } else if (doneMessage.reason().compare("save") == 0) {
            showError(doneMessage.data());
        }
    // This doesn't seem to send to QML
        emit cameraCaptureCompleted(url);
    }
    
    In C++:
    
    signals:
        void cameraCaptureCompleted(const QString &url);
    

    QML to signal received (somehow this must be duplicated?)

    signal cameraCaptureCompleted (string imageLink)
    onCameraCaptureCompleted: {}
    Console.Debug ("link to the image:" + imageLink);

    }

    The onCameraCaptureCompleted never triggered. The console.debug ("link to the image:" + imageLink); did not show anything.

    Thanks for your help!

    OK, I went back and looked at your provided code again and I see you try to put your location of onCameraCaptureCompleted on the Page, which certainly won't work, since the Page is not the class that has the cameraCaptureCompleted signal. I suggest one of these three approaches:

    Page {   id: myPage
       attachedObjects: [
          App {
             id: myApp
             onCameraCaptureCompleted: {
                // ---Do your stuff
             }
          }
       }
    }
    

    ... or if you prefer the Manager to appear on the page do this way:

    Page {
       id: myPage
       attachedObjects: [
          App {
             id: myApp
          }
       }
       function cameraCaptureCompletedHandler( imageLink ) {
          // ---Do your stuff
       }
       onCreationCompleted: {
          myApp.cameraCaptureCompleted.connect(myPage.cameraCaptureCompletedHandler);
       }
    }
    

    If you don't want to mess with connect() you could do the last example that much too:

    Page {
       id: myPage
       attachedObjects: [
          App {
             id: myApp
             onCameraCaptureCompleted: {
                myPage.cameraCaptureCompletedHandler( imageLink );
             }
          }
       }
       function cameraCaptureCompletedHandler( imageLink ) {
          // ---Do your stuff
       }
    }
    

    Of course, all these examples assume that you have successfully exposed the App class to QML with qmlRegisterType(). The signal you want to respond to being on the App class, you must place your location, or connect the App::cameraCaptureCompleted signal to your location explicitly.

    Hope it is clearer to you now.

  • Invoke the qml camera card

    Is it possible to invoke the pure qml camera card?

    I saw how in c ++, but prefer to keep in qml. Seems not work although

    For reference, see

    https://developer.BlackBerry.com/Cascades/documentation/device_platform/invocation/camera.html

    Invocation {
       id: cameraInvocation
       query: InvokeQuery {
              invokeTargetId: "sys.camera.card"
              invokeActionId: "bb.action.CAPTURE"
       }
    }
    

    I try to trigger it with

    cameraInvocation.trigger("bb.action.CAPTURE");
    

    In the console, I get:

    Warning: 16:42:14.882 InvocationPrivate::setQuery: you are not allowed to change InvokeQuery object Warning: 16:42:16.941 InvocationPrivate::onQueryResolved: query failed, no armed signal sent.
    

    It looks like the good feature of ae request

    SAID

  • Invoke the timer in QML

    Hello

    I have a problem with the invocation of application kernel clock in QML.

    This is my code:

            ActionItem {
                title: "Set Timer"
                imageSource: "asset:///images/Timer.png"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    timer.trigger("bb.action.VIEW");
                }
                attachedObjects: [
                    Invocation {
                        id: timer
                        query {
                            invokeTargetId: "bb.clock.launcher"
                            mimeType: "text/plain"
                            data: "timerTab"
                        }
    
                    }
                ]
            }
    

    This is what I get in the console:

    InvocationWrapper:nQueryFinished: no matching results for query service Menu
    mimeType = "text/plain".
    URI = QUrl("")
    Data = "timerTab".
    metadata = QMap()
    perimeter = 0
    action = «»
    target = "bb.clock.launcher".
    invokerIncluded = false
    InvocationPrivate:nQueryResolved: no matching result query, no armed signal sent.

    I forgot set some sort of clearance or to include the library?

    It's page with the attributes required to invoke the clock app

    https://developer.BlackBerry.com/native/documentation/Cascades/device_platform/invocation/clock.html

    I use 10.1.0.4633 SDK

    Unfortunately, this could be yet another case where the supply of the property 'data' on an InvokeQuery in QML does not work. There are other threads where the same situation arises with invoking the composer of the email and phone dialer.

    The only solution that I came up with so far is to use C++ for that. See Shadid post here for an example to do for e-mail (http://supportforums.blackberry.com/t5/Native-Development/Invoke-Email-with-Attachment/m-p/2251453#M...

    Note the use of PpsObject::encode (), which may be a necessary part of the puzzle, but with a simple string required for data in this case (for example, "timerTab"), which may be required. It is not clear and basically undocumented. They were never really intended to expose all PPS stuff to us, so these cases may all the places where the APIs are insufficient and different hacks are needed to overcome gaps.  (Note that all the calls done encode() is to convert the string to a byte array and preprending ' data : json: "for it and maybe add a line break at the end (which is required at least in the case of e-mail).)

  • Problem query invocation 10.1

    I have this code that worked very well in QML on 10.0 but now 10.1 it causes an error this query is a read-only property.

    {Of invocation

    ID: invokeReview

    query: {InvokeQuery}

    MIME type: ' application/x-bb-appworld.

    URI: "appworld://content/9081".

    }

    },

    No idea why this is now a problem and how to set the query in QML.

    I never quite understood how anyone got this works before, because I always got the error of the ReadOnly property.

    Essentially the InvokeQuery object exists already and is assigned to the property of the query, if you want to simply modify its content.

    Either question {mimeType: "...} "} (without the colon or InvokeQuery), or simply assign to individual fields directly, as in query.mimeType: «...» "and query.uri: «...» ».

  • Invoke the Image Viewer or editor Photo Cards Invocation.

    What is the code to call the Image Viewer (on a map), or retouching Photo given the location of image setting?

    C++ or QML.

    Thank you!

    Here's the code I use for this:

    void App::InvokeImageViewer(const QString &urlPic)
    {
        bb::system::InvokeManager* manager = new InvokeManager();;
        bb::system::InvokeRequest request;
    
        // Setup what to show and in what target.
        request.setTarget("sys.pictures.card.previewer");
        request.setAction("bb.action.VIEW");
        request.setMimeType("image/jpg");
        request.setUri(urlPic);
    
        InvokeTargetReply *targetReply = manager->invoke(request);
    }
    

    for additional references on the appeal of other apps, look here: https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/invoking_c...

Maybe you are looking for