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: 101
Registered: ‎01-06-2014
My Device: Q10
My Carrier: EE
Accepted Solution

Launch webpage from system dialog

How can I launch a particular website when the user selects the confirm option in a system dialog?

    SystemDialog {

                        id: facebookQmlDialog

                        title: "Exits Expert London on Facebook"

                        body: "This page will on in the Browser. If you are using 3G or 4G then you may incur data charges."

                    

                        onFinished: {

                            if (facebookQmlDialog.result == 

                            SystemUiResult.ConfirmButtonSelection)

                                ?;

                        }

                    }

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

Re: Launch webpage from system dialog

You would need to use the invocation framework and invoke the browser...

 

http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/invoking_co...

 


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: 101
Registered: ‎01-06-2014
My Device: Q10
My Carrier: EE

Re: Launch webpage from system dialog

[ Edited ]

Could you give an example please (i.e. where the question mark is - what to replace it with)? (as the link you provided doesn't show that)

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

Re: Launch webpage from system dialog

There's some examples on this page..

 

http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/sending_inv...


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: Launch webpage from system dialog

... and some qml examples in this thread...

 

http://supportforums.blackberry.com/t5/Native-Development/Dynamic-browser-invocation-in-qml/td-p/208...


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: 101
Registered: ‎01-06-2014
My Device: Q10
My Carrier: EE

Re: Launch webpage from system dialog

I'm struggling to find an example to invoke a webpage with the Blackberry Browser

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

Re: Launch webpage from system dialog

            Button {
                text: "Invoke Browser"
                onClicked: { invokeBrowser.trigger("bb.action.OPEN") }

                attachedObjects: [
                    Invocation {
                        id: invokeBrowser
                        query.invokeActionId: "bb.action.OPEN"
                        query.uri: "http://www.stok.biz"
                        query.invokeTargetId: "sys.browser"
                    }
                ]
            }

 


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.