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
Posts: 226
Registered: ‎03-14-2012
My Device: PlayBook 2.0
My Carrier: AT&T

Invocation framework - Sample app?

Hi,

 

I can't get the BB10 invocation framework to work on my Dev Alpha. :smileysad:

Is there an Air sample app (.bar) available that lets me share text from the browser to an app? 

I would love install it to see if it's working on my device.

 

Any help appreciated!!

Thank you

Vibes

Developer
Posts: 40
Registered: ‎07-06-2012
My Device: DevAlpha, PlayBook
My Carrier: BaseDE, BouyguesFR

Re: Invocation framework - Sample app?

Hi Vibes,

 

There is an example on github how to do invocation (the photo viewer/editor):

https://github.com/blackberry/Samples-for-AIR

 

But I did not find any good example for the invocation for core apps (BBM/Mail etc). There is a documentation here:

https://developer.blackberry.com/air/documentation/bb10/invoking_core_apps.html

but only a few of the things that they talk about actually works. This is kind of bad because without invocation of core features you can not get the 'build for BlackBerry' certification.

I am not sure if it is a problem of the DevAlpha not having all features or if the Air SDK has missing features or if I am just to stupid to get it right. But it would be good to get a complete example.

 

Cheers,

Toby

Developer
Posts: 226
Registered: ‎03-14-2012
My Device: PlayBook 2.0
My Carrier: AT&T

Re: Invocation framework - Sample app?

Hi Toby,

 

I tried the Samples-for-AIR and they are NOT working on my Dev Alpha!

Is it me or is this a common problem?

 

Are there any other files I could tried?

I desperately need a .BAR file to verify that the invocation framework is working on my Dev Alpha!

Who can help me? 

 

Thank you

Vibes

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Invocation framework - Sample app?

[ Edited ]

This code works to send a message over BBM

 

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

InvokeManager.invokeManager.invoke(request);

 I've seen posts where other have used the Calendar as well, but I don't have code for that.

Developer
Posts: 40
Registered: ‎07-06-2012
My Device: DevAlpha, PlayBook
My Carrier: BaseDE, BouyguesFR

Re: Invocation framework - Sample app?

Yeah, as I said some stuff works.

E.g. invoking the phone:

var request:InvokeRequest = new InvokeRequest();
var str:String = "";
str += "number::" + number + "\n"; 
str += "line_id::cellular\n"; 
str += "apply_smart_dialing:b:false\n"; 
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes( str );
request.data = ba;

request.action = "bb.action.DIAL";
request.mimeType = "application/vnd.blackberry.phone.startcall";
InvokeManager.invokeManager.invoke( request );

 

 

or share as mail:

var byteData:ByteArray = new ByteArray();
byteData.writeUTFBytes(text);

var request:InvokeRequest = new InvokeRequest();
request.mimeType = "text/plain"; 
request.target = "sys.pim.uib.email.hybridcomposer";
request.action = InvokeAction.SHARE;
request.data = byteData;

InvokeManager.invokeManager.invoke( request );

 but other things do not work .. e.g. to invite someone to BBM:

var request:InvokeRequest = new InvokeRequest();
request.target = "sys.bbm.sharehandler";
request.action =  "bb.action.INVITEBBM";
request.uri = "pin:" + pin;
InvokeManager.invokeManager.invoke(request);

 it will just lead to a blank page .. no error and no way to go back.

It would be cool if the sample apps, like weatherguesser had some of these typical things integrated.

 

Developer
Posts: 226
Registered: ‎03-14-2012
My Device: PlayBook 2.0
My Carrier: AT&T

Re: Invocation framework - Sample app?

Thanks for the snippets! :smileyhappy:

I don't know what permissions and extension are required for it. 

Can you please post the bar-descriptor.xml of it?

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Invocation framework - Sample app?

[ Edited ]

I have an ANE posted on GitHub that enables the invite to download option as well as adding item to the profile box. As far as I know that is the only way to do those functions as of yet.

Developer
Posts: 226
Registered: ‎03-14-2012
My Device: PlayBook 2.0
My Carrier: AT&T

Re: Invocation framework - Sample app?

Is there a .BAR available of it? I would love to test it on my device! :smileyhappy: 

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Invocation framework - Sample app?

The compiled files and the source are all on GitHub
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Invocation framework - Sample app?

CMY:
What is the github url for the ANE and BAR sample?