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
codespy
Posts: 9
Registered: ‎09-10-2012
My Device: BlackBerry 9300

Redirect to my application from webbrowser

Hi

 

Is there any posibility to redirect from webbrowser to application written in Casacedes as it is in android?

In android I can register intent-filer in activity

 

<intent-filter >
     <action android:name="android.intent.action.VIEW" />
     <category android:name="android.intent.category.DEFAULT" />
     <category android:name="android.intent.category.BROWSABLE" />
     <data android:scheme="myapp" />
</intent-filter>

 and application can be run from webbrowser.

 

In BlackBerry I try the same using Invocation framework.

I tried

<invoke-target id="myapp">
<invoke-target-type>application</invoke-target-type> <invoke-target-name>MyApp</invoke-target-name> <icon> <image>icon.png</image> </icon> </invoke-target>

 and

<invoke-target id="myapp">
  <invoke-target-type>application</invoke-target-type>
  <invoke-target-name>MyApp</invoke-target-name>
  <icon>
    <image>icon.png</image>
  </icon>
  <filter>
    <action>bb.action.VIEW</action>
    <action>bb.action.OPEN</action>
    <mime-type>*</mime-type>
    <property var="uris" value="myapp:"/>
  </filter>
</invoke-target>

 and this is not working.

 

If anyone has any ideas?

 

Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900

Re: Redirect to my application from webbrowser

your uri probably needs to be value="myapp://"
Like all of my posts
New Contributor
codespy
Posts: 9
Registered: ‎09-10-2012
My Device: BlackBerry 9300

Re: Redirect to my application from webbrowser

value="myapp://"

 

It doesn't work.

 

 

Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

Re: Redirect to my application from webbrowser

Correct me if I'm wrong - you want to start your app from browser right ?
New Contributor
codespy
Posts: 9
Registered: ‎09-10-2012
My Device: BlackBerry 9300

Re: Redirect to my application from webbrowser

"Correct me if I'm wrong - you want to start your app from browser right ?"


Yes. It is posible on BlackBerry 10 ?

Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900

Re: Redirect to my application from webbrowser

May you have a try to change the id to a unique id and keep the format as "xxx.xxx.xxx"?

 

You also need to implement a code for queryTargets

 

invoke-target id="myapp"



p(^_^)q
Good good study, day day up
New Contributor
codespy
Posts: 9
Registered: ‎09-10-2012
My Device: BlackBerry 9300

Re: Redirect to my application from webbrowser

I tried with "xxx.xxx.xxx" format

 

and 

 

I have somethink like that:

bb::system::InvokeManager invokeManager;
    QObject::connect(&invokeManager,
            SIGNAL(invoked(const bb::system::InvokeRequest&)),
            &app,
            SLOT(onInvoke(const bb::system::InvokeRequest&)));

 

 

 

BlackBerry Development Advisor
shaque
Posts: 237
Registered: ‎07-14-2008
My Device: Not Specified

Re: Redirect to my application from webbrowser

Hello,

There are two things involved here. 

 

1. Being able to invoke your app based on a custom URI. This is possible via the invocation framework.

2. The browser must make your custom uri a hyperlink. This requires that the String Pattern service of BB10 recognize your uri pattern and hyperlink it. Unfortunately it is not possible for 3rd party apps to register string patterns in the system today but we are definitely looking in to it.

 

So the short answer is, what you are trying to accomplish is not possible today.

 

The closest you can get is have the user download a file with a custom extension that your app supports and once downloaded, the user can open that file and have your app invoked.

 

Shadid