Opening links from code

@panreyes suggested this morning that there should be a way to open links from code. Since the Wii version can already do it it seemed like a good idea to enable this for Android too. So since revision 485 in the repo you can do it.
You can see a small video (yep, I love making small videos) of the feature in action below:
In order to open a link your code would look like this:
exec(_P_NOWAIT, "http://themostsearched.blogspot.com", 0, 0);
Just ensure to import mod_sys before using this function.

The cool thing is that Android is smart enough to know what type of link you're trying to open so if you give exec() a YouTube link, Android will open the YouTube app, if you give it a Google Play link it'll open Google Play, and so on.

I'll soon release binaries together with the packager. Since it's already working, I hope it won't take long before you can start packaging your own code for Android :)

0 komentar:

Post a Comment

Blog Archive