Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
beat84
Posts: 14
Registered: ‎06-24-2013
My Device: Blackberry Z10 Developer Edition
My Carrier: Wind

Invoke Calendar with params from QML

Hi all,

I'm trying to Invoke the calendar from qml.

In a Page I added this code:

 

actions: [

        //here there's the social sharing invoke that works properly

        InvokeActionItem {

            id: calInvoke

            title: qsTr("Add to calendar") + Retranslate.onLanguageChanged

            enabled: true

            query {

                mimeType: "text/calendar"

                invokeActionId: "bb.action.OPEN"

                invokeTargetId: "sys.pim.calendar.viewer.eventcreate"

            }

            imageSource: "asset:///icons/ic_calendar.png"

        }

]

 

When I starts the application, I can't see the calendar item.

In LOG I received this:

NOTICE InvokeActionItemPrivate::updateActionSet: final query state = "NoMatch"

 

Where's the error?

 

Then, how can I pass parameters to this invocation? I should create a C++ Q_INVOKABLE method to get a QByteArray to pass to data property?

 

Thanks!

Matt

Please use plain text.
Developer
Curahee
Posts: 224
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: Invoke Calendar with params from QML

Your action is OPEN but you are trying to create a new entry, right? So your action should be CREATE and not OPEN as stated in the documentation https://developer.blackberry.com/cascades/documentation/device_platform/invocation/calendar.html

 

actions: [
        //here there's the social sharing invoke that works properly
        InvokeActionItem {
            id: calInvoke
            title: qsTr("Add to calendar") + Retranslate.onLanguageChanged
            enabled: true
            query {
                mimeType: "text/calendar"
                invokeActionId: "bb.action.CREATE"
                invokeTargetId: "sys.pim.calendar.viewer.eventcreate"
            }
            imageSource: "asset:///icons/ic_calendar.png"
        }
]

 

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
New Developer
beat84
Posts: 14
Registered: ‎06-24-2013
My Device: Blackberry Z10 Developer Edition
My Carrier: Wind

Re: Invoke Calendar with params from QML

Oh, sorry! I copied the latest try.

I already use CREATE, but nothing happens.

I really don't understand, the social sharing with "bb.action.SHARE" works properly, but the calendar invocation doesn't shows the item in the action menu.

The BB10 software version I'm using is the 10.1.0.2312.

 

Please use plain text.
Developer
thayumaanavan
Posts: 21
Registered: ‎12-18-2012
My Device: Playbook ,Dev Alpha C, Limited Edition Z10
My Carrier: Airtel

Re: Invoke Calendar with params from QML

same problem for me.Any solution?
Please use plain text.
Developer
matizeitune
Posts: 366
Registered: ‎07-15-2013
My Device: blackberry Z10
My Carrier: Personal

Re: Invoke Calendar with params from QML

Maybe this will be usefull for you

https://github.com/blackberry/Cascades-Samples/tree/master/calendar

If you find this information useful please click like --->
@mezeitune on twitter
Please use plain text.
New Developer
beat84
Posts: 14
Registered: ‎06-24-2013
My Device: Blackberry Z10 Developer Edition
My Carrier: Wind

Re: Invoke Calendar with params from QML

I finally managed from C++.

I uploaded a sample on my github (https://github.com/beat84/BB10-Snippets).

I hope this can be useful.

 

 

Please use plain text.