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

Adobe AIR Development

Reply
New Developer
bdeneau
Posts: 34
Registered: ‎03-23-2011
My Device: Bold 9700
My Carrier: Rogers
Accepted Solution

Links in HTMLText not working

I was just wondering if links in HTMLText are supposed to be working yet?  I have a link in the HTMLText property of a label with a stylesheet attached to it.  It renders visually the way I'd expect but it's not clickable.  Or if it is it doesn't do anything when I click it.

 

Is this still normal with the SDK or am I doing something wrong?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Links in HTMLText not working

Using an anchor element (<a href="http://foobar">) in TextField.htmlText (or on a qnx Label) does not result in the browser being launched in 0.9.4. 

 

If you can test with 0.9.3 you can confirm your code is correct (but only if the browser is not already running).

 

We currently assume all such problems are simulator bugs, and eagerly await real hardware on which to confirm it...

 

(Likewise, explicitly calling navigateToURL() works in 0.9.3 but does nothing in 0.9.4.)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
New Developer
bdeneau
Posts: 34
Registered: ‎03-23-2011
My Device: Bold 9700
My Carrier: Rogers

Re: Links in HTMLText not working

Great, I was hoping to get that answer. I'll be able to check in a couple of weeks!!!

Please use plain text.
Contributor
Dinges
Posts: 21
Registered: ‎03-18-2011
My Device: Playbook
My Carrier: KPN

Re: Links in HTMLText not working

There is also an issue with flash, that causes links in html text not to work when the textfield is not set to be selectable. So you could check if your tf's selectable property is set to true and test again, just to be sure, but at this stage, it might as well be a simulator thing.

Please use plain text.
Contributor
HybridMind
Posts: 24
Registered: ‎03-28-2011
My Device: PlayBook Developer
My Carrier: N/A

Re: Links in HTMLText not working

Will navigateToUrl() be eventually supported again or was it taken out on purpose?  If it is just a simulator bug that is good to know but I haven't been able to find an official post about it.

 

If our app/game uses navigateToUrl do we need a xml permission of "access_internet" ?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Links in HTMLText not working

 


HybridMind wrote:

Will navigateToUrl() be eventually supported again or was it taken out on purpose?  If it is just a simulator bug that is good to know but I haven't been able to find an official post about it.

 

If our app/game uses navigateToUrl do we need a xml permission of "access_internet" ?


We're rarely told anything clear about things like that, so we can only assume.  I expect navigateToURL() to work again in the next version and the final release just as it did in 0.9.3, where it would launch the browser.  It should also open a new tab if the browser is already open.

 

 

I would personally not use "access_internet" for an app that used navigateToURL(), because in my view it's the browser that's accessing the internet, not the app that launched it.

 

If they want any use of navigateToURL() to be considered restricted functionality, they'll arrange in the final OS version for it to be prevented or blocked in any app that didn't specify the correct permission. 

 

Since the browser does not communicate anything back to the app that launches it, I don't think there's any security issue involved, so I see no reason the functionality would be restricted.  Also note that it's not one of the APIs listed in the docs (since, actually, none are listed for that one, currently).


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
HybridMind
Posts: 24
Registered: ‎03-28-2011
My Device: PlayBook Developer
My Carrier: N/A

Re: Links in HTMLText not working

I see what you are saying about "access_internet" regarding navigateToUrl.

 

What if we are using an integrated online leaderboards and metrics system though?  My game does communicate directly with the internet in that case so I wanted to be upfront with both the user and BlackBerry.

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Links in HTMLText not working

If your application is physically accessing the internet, then set that tag.  If it is like the phone, if the tag is not set, your application could be blocked to access the requested service.  Keep in mind, the user will be able to change their preference on each of the tags, so in theory; your app will need to manage a denial gracefully.

 

 

Please use plain text.