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
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Invokation target not working

[ Edited ]

Hi, I want my app to be invoked as soon as google is opened. I added invoke target in bar-descriptor.xml, but it doesn't get ivoked, here's the code:

<invoke-target id="com.staw.testApp">
<invoke-target-type>application</invoke-target-type>
<invoke-target-name>TestingApp</invoke-target-name>
<icon>
<image>icon.png</image>
</icon>
<filter>
<action>bb.action.OPEN</action>
<mime-type>text/html</mime-type>
<property var="uris" value="http://google.com"/>
</filter>
</invoke-target>

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Invokation target not working

I'm afraid it won't work that way, you can register to have your app as one that can handle web pages, however it will always be up to the user (at least from 10.2 onwards) which app he wants to choose to handle the page.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Invokation target not working

So if as I suspect you are trying to override the users choice of search engine then it is not possible to do this with invocation.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: Invokation target not working

No, that's not I want.. I want the app to be opened as soon my app's website is loaded. I still don't have a domain name, so I used google as a placeholder. What's wrong with the way I registered as an invokation target?
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Invokation target not working

Sorry I'm still not getting what you want to do.

 

Is this it... When a user opens a page in the browser that is a page you are interested in you want to invoke your app?

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: Invokation target not working

exactly.. the same way BB World is invoked as soon as I open appworld.blackberry.com in my browser..

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Invokation target not working

Ah, interesting, my first thoughts would have been that isn't possible but perhaps it is.

 

Intrigued I quickly put this in a WebView and it did the same thing, so whether this is something that can be handled by invocation or is something they've hard-wired in is something that would need investigating.

 

Not very helpful, sorry.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: Invokation target not working

But take a look at this page, they say it's possible.. Don't know how they expect us to do it.. Smiley Happy

 

https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/default_ap...

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Invokation target not working

Try this...

 

<filter>
    <action>bb.action.VIEW</action>
    <action>bb.action.OPEN</action>
    <mime-type>*</mime-type>
    <property var="uris" value="http://appworld.blackberry.com"/>
</filter>

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Invokation target not working

Well I've tried lots of different things, no problem invoking from web pages, sms, emails, etc. but no luck from the browser.

 

I now suspect that the browser/MapView has this hardwired in, looking for appworld:// and appworld.blackberry.com and only sends an invocation request for those urls.

 

If someone else wants to take up the gauntlet on this feel welcome, I'd love to be wrong on this one.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.