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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
My Carrier: Rogers
Accepted Solution

Trying to Share Photo using C++ Invoke

I have this code and I thought it should show me all available apps that could share the file but all it does is show me my "BBM Groups" and I don't understand why.  

InvokeManager invokeManager;
	InvokeRequest request;
	request.setAction("bb.action.SHARE");	
	request.setUri("file:///accounts/1000/shared/camera/IMG_00000003.png");
	invokeManager.invoke(request);

 

Not sure what I am missing.  Thx.


Steven Kader at JaredCo
   Follow me on Twitter     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
Developer
shahumang8
Posts: 459
Registered: ‎08-09-2010

Re: Trying to Share Photo using C++ Invoke

Hi JaredCo,

 

 Please check below link.

 

 http://developer.blackberry.com/cascades/documentation/device_platform/invocation/menus.html

 

 

-------------------------------------------------------------------------------

 

feel free to press the like button on the right side to thank the user that helped you.

Please use plain text.
Developer
simon_hain
Posts: 13,781
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Trying to Share Photo using C++ Invoke

Hi Steven,
i had the same issue last week.
You are doing an invocation that says "i want the best app to handle this", so the system decides what to do.

Instead of using the invoke manager you should create an invokequery.

 

Here is the code i use to share a file:

invocation = Invocation::create(InvokeQuery::create().parent(this).uri("file:///" + invokeActionId = "bb.action.SHARE";
connect(invocation, SIGNAL(armed()), this, SLOT(onArmed()));
connect(invocation, SIGNAL(finished()), invocation, SLOT(deleteLater()));

 in onArmed i call

invocation->trigger(invokeActionId);

 

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
My Carrier: Rogers

Re: Trying to Share Photo using C++ Invoke

Got it...thanks for the help.

Steven Kader at JaredCo
   Follow me on Twitter     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.