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: 68
Registered: ‎03-18-2014
My Device: Z10
My Carrier: T-Mobile
Accepted Solution

Invoke / Open in / default application

Hello,

 

I currently have an issue with my app (for OS10.2.1). In the application, when someone tap on a web URL, I redirect the user to his favorite web brower. To do so, I invoke the browser using this: 

 

Invocation {
            id: linkInvocation
            
            
            query {
                onUriChanged: {
                    linkInvocation.query.updateQuery();
//                    linkInvocation.query.invokeTargetId = "sys.browser";
                    linkInvocation.query.mimeType = "text/html";
                }
            }
            
            onArmed: {
                
                trigger("bb.action.OPEN");
            }
        },

 

 

which work fine. But some of my users use a different web browser than the system one, and reported an issue: when they click on a link, they are asked to choose which application they want to open the URL: the default web bowser or something else... 

 

And there is a checkbox to remember their choice. But unfortunatly, the system do no remember the user's choice using the application choice. Therefore, every time they are asked to choose which application they want to use to open the link. 

 

Is there something I missed? 

 

by setting the invokeTargetID, I could force the system web browser... But is there something I should do, so the system remember the user's choice? 

 

Thanks a lot for the help!

Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: Invoke / Open in / default application

I don't think there's anything you can do on your end. That sounds like a bug in the OS.
Developer
Posts: 68
Registered: ‎03-18-2014
My Device: Z10
My Carrier: T-Mobile

Re: Invoke / Open in / default application

Thanks a lot for your reply.

 

Yes, maybe it is... I tried to set the default webbrowser by setting the invokeTargetID to "sys.browser" and it somehow seems to work. "somehow", because it is not what I expected: the user is asked to choose his webbrowser.

 

But now, when the "remember" check box is selected, it seems to remember it.

 

So maybe that is the solution...

 

Thanks again.

Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: Invoke / Open in / default application

Yea, but that method by-passes the part that let's the user choose between the core browser app and another third party app.  It's not really fixing the original issue which is not remembering the user's selection.  Anyway glad you're happy with this. Smiley Happy

Developer
Posts: 68
Registered: ‎03-18-2014
My Device: Z10
My Carrier: T-Mobile

Re: Invoke / Open in / default application

Well, I was expecting that it by-passes the user choice, but it does not ! 

 

And from that point it started working as I wanted:

- ask for the web browser

- (if the remember checkbox is selected, then it remember the choice) 

 

So maybe it was necessary... I am not sure... 

Developer
Posts: 26
Registered: ‎10-05-2013
My Device: Z10
My Carrier: ?

Re: Invoke / Open in / default application

What OS are you on? It just opens the BlackBerry browser for me.