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
Highlighted
Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

dynamic URI change in InvocationActionItem result in the error

[ Edited ]

Hi,

I want to integrate BBM in my application. I refere this url of invocation framework demo using BBM

http://devblog.blackberry.com/2012/11/bbm-invocation-framework/?CPID=E10C020

 

 

 

1.  When i add code of share text using BBM given in the link give below compile time error

 

Error Message: "Type mismatch of value of the 'data' property. Expecting QByteArray and found string"

code snippet

InvokeActionItem {
title: "Share Text Over BBM"
query {
mimeType: "text/plain"
invokeTargetId: "sys.bbm.sharehandler"
invokeActionId: "bb.action.SHARE"
data: "This is some text to share."
}
}

 

2.  When i add code  to change the uri dynamicly inside the onTriggrded  using code given in the link give me below run time error.

Error Message: "Error: Invalid write to global property "uri""

Code snippet :

InvokeActionItem {
title: "Share Image Over BBM"
ActionBar.placement: ActionBarPlacement.InOverflow
query {
mimeType: "image/png"
invokeTargetId: "sys.bbm.sharehandler"
invokeActionId: "bb.action.SHARE"
uri: "file:///accounts/1000/shared/camera/IMG_00000197.png"
}
onTriggered: {
uri= "file:///accounts/1000/shared/camera/IMG_00000206.png"
}
}

 

 

 

Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: dynamic URI change in InvocationActionItem result in the error

Hi,

I resolve the issue 1 which is sharing text using bbm. We need to convert QString into QByteArray then it works fine.

Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Hi,   Did anyone resolve this issue then please help me t...

Hi,

 

Did anyone resolve this issue then please help me to resolve this issue?

BlackBerry Development Advisor
Posts: 15,211
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Hi, Did anyone resolve this issue then please help me t...

Refer to this link in Issue Tracker for issue #2.

 

InvokeActionItem onTriggered doesn't update URI

 

This should be fixed in the update coming this week.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
Posts: 8
Registered: ‎02-17-2013
My Device: Z10 LE
My Carrier: Sosh

Re: Hi, Did anyone resolve this issue then please help me t...

Hello,

The issue has not been resolved since. Any news/known workaround?
Thanks.

Developer
Posts: 653
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: Hi, Did anyone resolve this issue then please help me t...

You can see this sample app for the workaround.  Needs to be done in c++ :

 

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


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing