01-09-2014 01:49 AM
I want to inoke my app when user click on a link("www.xyz.com/myapp") from default bb browser or somewhere else when this link found and then open my app and perform task according to clicked link.
to achieve this , using this docs https://developer.blackberry.com/native/documentat
<invoke-target id = "com.xyz.sampleApp">
<icon> <image>sample.png</image> </icon>
<property var="uris" value="www.xyz.com/myapp"> </property>
correct me if i missing something.
Solved! Go to Solution.
01-09-2014 08:58 AM
01-09-2014 10:40 AM
This functionality is not supported. Web links will only open in the web browser by default. This is because of security concerns. For example a malicious developer could override links to a bank's web site and gather banking information.
You can however register to be one of the apps able to open a specific link. If a user long-presses on a link in their email, Facebook, etc, your app can register to be one of the apps that will open the URL. If the user selects your app from the list (the list would probably consist of your app and the browser in this case) then your app will be invoked. Here is some sample code that you can add to your bar-descriptor file to see this:
<invoke-target id="com.example.bb10samples.uri"> <invoke-target-name>BB10 Sample App</invoke-target-name> <icon><image>icon.png</image></icon> <invoke-target-type>APPLICATION</invoke-target-typ
e> <filter> <action>bb.action.OPEN</action> <mime-type>*</mime-type> <!-- internal urls --> <property value="bb10samples://,https://m.bb10samples.com/test/,http://m.bb10sampl es.com/test/" var="uris"/> </filter> </invoke-target>
You can also register for custom urls (“bb10samples://” in the above code sample) so you can create links like <a href=” bb10samples://test/testData”>Open in my app!!</a> which will invoke your app.