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: 34
Registered: ‎12-20-2010
My Device: DevAlpha Beta 2
My Carrier: Orange

InvokeActionItem with specific text according to target (Facebook, Twitter, BBM, ...)

Hello everyone,


I have a question. Is there a way to set the data of a InvokeActionItem according to the sharing target selected by the user.


Here is the way I create my InvokeActionItem :


InvokeActionItem {

id: shareActionItem

title: qsTr("shareAction")

query {

mimeType: "text/plain"

invokeActionId: "bb.action.SHARE"


onTriggered: {

var t = "TEST 1";

data = t


onStateChanged: {

var t = "TEST 2";

data = t




When the user selects the ActionItem, a page with a list a sharing targets available appears. Then, it seems that onStateChanged is called when the user selects one. I can still update the data then.

However, I have no idea of how to know the target selected (Facebook ? Twitter ?, ...).


Do you know if it is possible or not ? I tried to log the query parameters but none of them gave my the info I needed...


Thank you!

Trusted Contributor
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: InvokeActionItem with specific text according to target (Facebook, Twitter, BBM, ...)

I am not certain about that specifically, but a work around would be to use bound invocations to those specific applications. Then you wouldnt have to programatically change the text.
If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.