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: 102
Registered: ‎01-12-2011
My Device: Blackberry Playbook
My Carrier: DiGi twitter@TylorPin

Invokation: Sharing image over BBM

Hi guys, I'm trying to share an image over BBM, but I am unable to do so, it doesnt bring up the BBM card.

private var invokation():void
			{
				var request:InvokeRequest = new InvokeRequest();
				request.mimeType = "image/png";
				request.target = "sys.bbm.sharehandler";
				request.action = "bb.action.SHARE";
				request.uri="/accounts/1000/shared/documents/1.png"
				InvokeManager.invokeManager.invoke(request);
			}

 I've been able to share plain text over BBM. Anybody know if I am doing anything wrong?

Click "like" if my reply helps and click "Accept as Solution" if it solves your problem!

twitter @Twopinstudio
my vendor page https://appworld.blackberry.com/webstore/vendor/7126/?lang=en
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Invokation: Sharing image over BBM

I haven't touched AIR for well over a year, so I can't really say. I do note, however, that your "uri" is just an absolute path... would it make any difference if you included "file://" in front of that to make it an actual uri?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 102
Registered: ‎01-12-2011
My Device: Blackberry Playbook
My Carrier: DiGi twitter@TylorPin

Re: Invokation: Sharing image over BBM

Added but the result are still the same.
Click "like" if my reply helps and click "Accept as Solution" if it solves your problem!

twitter @Twopinstudio
my vendor page https://appworld.blackberry.com/webstore/vendor/7126/?lang=en
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Invokation: Sharing image over BBM

Try:

public static function shareFile( path : String ) : void
{
	var request :InvokeRequest = new InvokeRequest();
	request.action = InvokeAction.SHARE;
	request.target = 'sys.bbm.sharehandler';
	request.uri = path;
			
	InvokeManager.invokeManager.invoke( request );
}

 Where

 

shareFile( 'file://' + file.nativePath );

New Developer
Posts: 31
Registered: ‎08-03-2012
My Device: Alpha C
My Carrier: claro

Re: Invokation: Sharing image over BBM

 hi.

doesn't work for me?

 

has someone  get it Work?.

 

try both.     file.nativepath  and   file.url.

 

 

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

Re: Invokation: Sharing image over BBM

Are you prefixing the path with 'file://' ? It needs to know the protocol to use.
New Developer
Posts: 31
Registered: ‎08-03-2012
My Device: Alpha C
My Carrier: claro

Re: Invokation: Sharing image over BBM

[ Edited ]

Well, I try "bb.action.SHARE". Not image.SHARE I need send a file .

The file.url - has already the "file://" , and the listener InvokeEvent.INVOKE_TARGET , everything seems rigth but  no call BBM for upload the file.

I already documented in the app-XML . and set id-target , set action and doesn't all.

<invoke-target id = "sys.bbm.sharehandler">
<action> bb.action.SHARE</action>
? May be a uri var?-
</invoke-target>


thanks..

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

Re: Invokation: Sharing image over BBM

You only need to add the XML if you want to be a target for this type of URI.
New Developer
Posts: 31
Registered: ‎08-03-2012
My Device: Alpha C
My Carrier: claro

Re: Invokation: Sharing image over BBM

[ Edited ]

well i released . hope while i update the app i can resolve this. 

 

 

 

thanks i 

 

  

Developer
Posts: 210
Registered: ‎05-18-2009
My Device: NA
My Carrier: NA

Re: Invokation: Sharing image over BBM

I get what your saying. Sending an invoke to BBM of an image isn't working.

I've had nothing but problems with the BBM share card on AIR. For a long time it didn't work and I found it was because of channels beta.

No idea if BBM integration was ever fixed for AIR - I removed the code from my projects and just let people use twitter etc. Although it is a sad situation.