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
Developer
nhuanvd
Posts: 20
Registered: ‎12-11-2012
My Device: Blackberry Z10
My Carrier: Viettel

Re: Invoking share card

Thanks for your help and nice tutorial.

Please use plain text.
New Member
robinkam
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");
                invoke.trigger("bb.action.SHARE");
            }
        }

 

Please use plain text.
Developer
pradeep_ch
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.

 

Thanks.

Please use plain text.
Developer
TheMarco
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

Please use plain text.
Developer
slashkyle
Posts: 818
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

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

Please use plain text.
New Contributor
k_waheed_kotb
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 :Clap: :Punk:

Please use plain text.
Trusted Contributor
Sankar_S
Posts: 139
Registered: ‎08-22-2013
My Device: None
My Carrier: Aircel

Re: Invoking share card

thanks for sharing code link :smileyhappy:

Please use plain text.