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
Qfine
Posts: 6
Registered: ‎02-21-2014
My Device: Z10
Accepted Solution

Add WebWorks App to Share Card

Dear Community,

 

how can I add my Webworks App to the ShareCard? 

What I exaclty want:
I want to "share" a link from the native browser to my Application, but I can't find a solution how to add my App to Share Cards. 

Someone know how to do this?

Developer
anphorea
Posts: 134
Registered: ‎11-27-2012
My Device: Z10 LE,Dev Alpha C

Re: Add WebWorks App to Share Card

Check out com.blackberry.invoked plugin.

/*
WebWorks Developer
*/
New Contributor
Qfine
Posts: 6
Registered: ‎02-21-2014
My Device: Z10

Re: Add WebWorks App to Share Card

Ok I've added following:

<rim:invoke-target id="myAPP">
<type>APPLICATION</type>
<filter>
<action>bb.action.SHARE</action>
<mime-type>text/*</mime-type>
<property var="uris" value="http://,https://" />
</filter>
</rim:invoke-target>

Now I' can see the APP as a share card, and the app also opens, but I can't receiv param. 
I want to SHARE the URL link from native blackberry browser to my app!

I tried following: 

I added: 

document.addEventListener('invoked',onInvoked); 

and also: 

onInvoked : function(invokeRequest){
document.getElementById("urll").value = "INVOKED";
document.getElementById("urll").text = "INVOKED";
alert(invokeRequest.target);
},

 

Bit I dont get an variable

BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Add WebWorks App to Share Card

I believe this sample app shows you how to do this. 

 

https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Invocation

 

You'll mostly be interested in the 'Invocable' app in that repo.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
New Contributor
Qfine
Posts: 6
Registered: ‎02-21-2014
My Device: Z10

Re: Add WebWorks App to Share Card

Thank you for your answer. I solved my problem with your posted link. I've used now bb.action.OPEN instead of using bb.action.SHARe, so I can push the URLS directly from the webbrowser to my app. 

Thank you