B4J Question Open a hyperlink?

tchart

Well-Known Member
Licensed User
Longtime User
Does anyone know how to programmatically open a hyperlink?

I need to open the hyperlink in the default browser.

An code snippets?
 

Roycefer

Well-Known Member
Licensed User
Longtime User
If it's in a UI app, use
B4X:
fx.ShowExternalDocument("http://www.example.com")

In a non-UI app, you won't have access to the fx Object so you'll need to use the jAWTRobot library and call
B4X:
robot.SystemOpenAddressInBrowser("http://www.example.com")
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
Thanks Roycefer. I was trying showexternaldocument from my app which is non-ui and it wasnt working (now i know why). I'll try the other libray.
 
Upvote 0
Top