03-27-2011 08:41 PM
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?
Solved! Go to Solution.
03-27-2011 08:47 PM
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.)
03-27-2011 08:57 PM
Great, I was hoping to get that answer. I'll be able to check in a couple of weeks!!!
03-28-2011 01:19 PM
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.
03-28-2011 02:19 PM
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" ?
03-28-2011 02:37 PM
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).
03-28-2011 02:44 PM
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.
03-28-2011 02:54 PM
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.