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
Highlighted
New Contributor
Posts: 6
Registered: ‎03-17-2012
My Device: 8520
My Carrier: O2

Share Webview URL with BBM

Hello All,

 

I am trying to share a webview URL with BBM, I am using the following code.

 

// Default empty project template
import bb.cascades 1.0

// creates one page with a label

Page {
    WebView {
        id: myView
        url: "http://www.google.co.uk"
}
    actions: [
        InvokeActionItem {
            ActionBar.placement: ActionBarPlacement.OnBar
            title: "Share"
            query {
                mimeType: "text/plain"
                invokeActionId: "bb.action.SHARE"
            }
            onTriggered: {
                data = "**************"
            }
        }
    ]

}

 

If I put some thing in data "**************************" then that can be sent ok to a BBM Contact.

I need the app to pick up the url automaticaly from the url field and load itinto data.

 

Anyone got any clues?

 

Cheers

Developer
Posts: 285
Registered: ‎08-06-2010
My Device: Z10

Re: Share Webview URL with BBM

myView.url



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
New Contributor
Posts: 6
Registered: ‎03-17-2012
My Device: 8520
My Carrier: O2

Re: Share Webview URL with BBM

Hi RileyGB

 

I have already tried that but it does not work.

 

If I use "Checkout this url" + myView.url the message box on BBM gets populated with "Checkout this urlundefined"

 

Cheers