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

Posts: 27
Registered: ‎12-11-2012
My Device: Blackberry Z10
My Carrier: Viettel

Re: Invoking share card

Thanks for your help and nice tutorial.

New Member
Posts: 1
Registered: ‎03-04-2013
My Device: BlackBerry Dev Alpha
My Carrier: RIM

Re: Invoking share card

You may try this which works for me perfectly:

ActionItem {
            ActionBar.placement: ActionBarPlacement.OnBar
            title: "Share"
            attachedObjects: [
                Invocation {
                    id: invoke
                    query: InvokeQuery {
                        id: invokeQuery
                        mimeType: "text/plain"
                        invokeTargetId: "sys.bbm.sharehandler"
                        invokeActionId: "bb.action.SHARE"
                        onQueryChanged: updateQuery()
                    onArmed: {
                        console.log(">>> onArmed: "+sharedText);
                        invokeQuery.data = sharedText;
            onTriggered: {
                console.log(">>> onTriggered");


Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: Invoking share card

Hi Macro,


How can I capture that the user has posted succesfully or clicked on cancel button on postwall screen.



Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Invoking share card

Good question. I'm not entirely sure if that's possible and if so ,how. Maybe someone else can chip in here?

Staff UI Prototyper (read: full-time hacker)

My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Invoking share card

you could assign a property to onClicked() & update it when clicked so when the user clicks to share text your app is notified, i don't belive we can capture the cancel signal from the share invoaction page that would require custom building that section.


Container {
    property bool buttonClicked;
    Button {
        onClicked: {
            buttonClicked = true;
            //share text

 then you could have an onTouched function to say if they touch anywhere else other than the button, to change it's value back to false

New Contributor
Posts: 8
Registered: ‎07-20-2013
My Device: BB Z10, BB Q10
My Carrier: Vodafone

Re: Invoking share card

Your Awesome my friend, that's what I was seraching for  

Trusted Contributor
Posts: 139
Registered: ‎08-22-2013
My Device: None
My Carrier: Aircel

Re: Invoking share card

thanks for sharing code link Smiley Happy