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
New Contributor
gyoong2
Posts: 9
Registered: ‎11-23-2010
My Device: Not Specified

Deeplinking in Blackberry 10 (Custom URL Scheme)

Is there a way in BB10 to register a custom URL scheme (similar to tel:smileyhappy: so that when the URL is clicked on from an email or Browser, it will launch my application? I tried looking for this in the forums and could not find an answer.

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Deeplinking in Blackberry 10 (Custom URL Scheme)

This isn't directly supported. But if the URL linked somewhere to a file with a custom mime type or extension that your application was registered to handle, your application can be invoked to handle it.

This is done through use of the invocation framework.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
gyoong2
Posts: 9
Registered: ‎11-23-2010
My Device: Not Specified

Re: Deeplinking in Blackberry 10 (Custom URL Scheme)

Hi Mark,

 

Thanks for the quick reply.  If I had a dynamic URL parameter appended to the end of this URL linked to a custom mime type, would it be passed along to the application as part of the invocation framework when the browser tries to open it? 

 

 

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Deeplinking in Blackberry 10 (Custom URL Scheme)

Yes it would.  The URL is available to the application being invoked.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
gyoong2
Posts: 9
Registered: ‎11-23-2010
My Device: Not Specified

Re: Deeplinking in Blackberry 10 (Custom URL Scheme)

I've looked over the Invocation Framework and I couldn't figure out how to make it work the way I want.  

 

Here's my current setup:

I have an HTML page with the following: 

 

<html>

<a href="testdeeplink://test?test=1234">Test Deeplink</a>

</html>

 

In my BB10 WebWorks App, I have the following in config.xml:

 

<featureid="blackberry.invoke"/>

 

<rim:invoke-target id="com.test.testdeeplink">
<type>APPLICATION</type>
<filter>
<action>bb.action.OPEN</action>
<action>bb.action.SET</action>
<mime-type>*</mime-type>
<property var="uris" value="testdeeplink://" />
</filter>
</rim:invoke-target>

 

When clicking on the link in the BB10 Browser, I would expect to see my application being launched but the browser only complains that it cannot open testdeeplink://.  Is what I'm expecting correct?  Would this behave differently if the link were in an email?

 

Thanks

New Contributor
gyoong2
Posts: 9
Registered: ‎11-23-2010
My Device: Not Specified

Re: Deeplinking in Blackberry 10 (Custom URL Scheme)

Sorry, the above should be:

 

<featureid="blackberry.invoked" required="true "version="1.0.0.0"/>

 

<rim:invoke-target id="com.test.testdeeplink">
<type>APPLICATION</type>
<filter>
<action>bb.action.OPEN</action>
<action>bb.action.SET</action>
<mime-type>*</mime-type>
<property var="uris" value="testdeeplink://" />
</filter>
</rim:invoke-target>

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Deeplinking in Blackberry 10 (Custom URL Scheme)

Custom protocols like "testdeeplink://" aren't supported.  You'll need to use something standard like HTTP, HTTPS, etc...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker