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

Adobe AIR Development

Reply
Developer
spoutnik
Posts: 39
Registered: ‎07-06-2012
My Device: DevAlpha, PlayBook
Accepted Solution

Invocation Framework share on BBM

Hi,

 

I am trying to make the invocation framework work. But unfortunatly I can not find good samples for the AIR sdk. So I hacked something together from what I found for the native sdk. It works.. the BBM launches and lets me pick a contact. But the text is not passed to BBM.

This is my code:

 

var byteData:ByteArray = new ByteArray();
byteData.writeUTF("This is some text to share.");

var request:InvokeRequest = new InvokeRequest();
request.mimeType = "text/plain";
request.target = "sys.bbm.sharehandler";
request.action = InvokeAction.SHARE;
request.data = byteData;

InvokeManager.invokeManager.invoke(request);

 

Could you give me a hint what I am missing?

 

Thank you,

Toby

 

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Invocation Framework share on BBM

We are trying to get information from RIM about the schemas for the native applications. Setting text is problem not instructing the app in what to do. There might be more involved.

More information for AIR apps is suppose to be available by the gold release (12/11).
Developer
spoutnik
Posts: 39
Registered: ‎07-06-2012
My Device: DevAlpha, PlayBook

Re: Invocation Framework share on BBM

Hi,

 

after some playing around I found the solution.

In the code above I used:

byteData.writeUTF("This is some text to share.");

but you have to use:

byteData.writeUTFBytes("This is some text to share.");

then the BBM is launched and the text is copied correctly.

 

Would still be cool to have more examples about how to invoke the core BB10 applications.

 

Cheers,

Toby

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: Invocation Framework share on BBM

Yes - more is on the way. We will be adding an invocation section to the AIR docs.

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Invocation Framework share on BBM

Thank you SO MUCH! Been fighting this one for weeks.
Developer
spoutnik
Posts: 39
Registered: ‎07-06-2012
My Device: DevAlpha, PlayBook

Re: Invocation Framework share on BBM

Hi Dustin,

 

that is great news. I think the general invocation framework is well documented and there is also a sample app in the github.

What I really miss are examples on how to invoke plattform features:

- share on ... (BBM, email, nfc etc.)

- e-Mail composer card

- add contact/calendar card

.. invokation + cards is probably the most exciting feature of BB10 and it deserves to be promoted.

 

Thank you,

Toby