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

Web and WebWorks Development

Reply
New Contributor
swaininfotech
Posts: 5
Registered: ‎10-17-2013
My Device: Z10
My Carrier: Airtel

How do I add my app as one opton in the Share Menu ?

I am developing my app using BlackBerry 10 WebWorks SDK 1.0.4.11. I want to share the images to an external Server. I am having issues having a menu item (I am trying to add a context menu) in the Share menu which will invoke my app to do the uploading and then taking it from there.

 

However, I am not able to add a menu ( I believe its a context menu) to the Share options ( Camera > Images > Share ). Could not find out any example or any guidance as well.

 

Any help ?

 

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: How do I add my app as one opton in the Share Menu ?

Hello,

 

I think I understand what you're trying to do, and I think the best way would be to make use of our FileTransfer API. 

 

This will allow you to upload a file from the device, to a server.

 

API Reference: https://developer.blackberry.com/html5/apis/blackberry.io.filetransfer.html

Sample Application: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/fileTransfer

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
New Contributor
swaininfotech
Posts: 5
Registered: ‎10-17-2013
My Device: Z10
My Carrier: Airtel

Re: How do I add my app as one opton in the Share Menu ?

The file transfer is the second part. First I want to add my app to the Share Menu. So when the user opens the Share menu, he should see my app as one option.

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: How do I add my app as one opton in the Share Menu ?

Do you want your app to show up as a Share target from other apps on the phone, and invoke your app if they choose to share to it?

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
New Contributor
swaininfotech
Posts: 5
Registered: ‎10-17-2013
My Device: Z10
My Carrier: Airtel

Re: How do I add my app as one opton in the Share Menu ?

[ Edited ]

Yes, thats what I want to do, it should show up as a Share target in the images. That means, if a user trys to share, he should see my app as one option. I did all the config changes going through the doc. Added the feature, invoke target element, rim-invoke target, rim permissions, but nothing works.

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 796
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: How do I add my app as one opton in the Share Menu ?

We have a great community sample that shows how to do this here:

 

https://github.com/blackberry/BB10-WebWorks-Community-Samples/tree/master/Invoke-FileSystem-moimgur

 

The first part of it is declaring the share target in your config.xml file and including the right parameters for the content you want to handle. Check out that file in the sample to see what was done there.

Tim Windsor
Application Development Advisor II
Please use plain text.