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
Developer
testinz
Posts: 180
Registered: ‎09-03-2012
My Device: Blackberry 10
Accepted Solution

Hook application to "share" text feature?

Hello,

 

I am wondering how do you add the application to the "share text" functionality?

 

E.g.: in the browser, you select a text and click on the "share" button, the system will open a list of application available to select for sharing.

 

Which API is available for my application to do that?

 

Thanks!

Please use plain text.
Retired
PBernhardt
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30

Re: Hook application to "share" text feature?

Just use the Invocation framework.

 

https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/receiving_...

 

You want to register for handling the bb.action.SHARE action, with mime type text/plain.

 

BBM, Twitter, and Facebook are examples of how to structure your target:

 

https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/bbm.html

 

Basically just have the same invocation target for sharing text as BBM, but with your own Target ID.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
Developer
testinz
Posts: 180
Registered: ‎09-03-2012
My Device: Blackberry 10

Re: Hook application to "share" text feature?

Thanks PBernhardt.

It works well.
Please use plain text.