I need help to make an apk that I open a website
Monkey Forums/Monkey Beginners/I need help to make an apk that I open a website
| ||
I need help to make an apk that I open a website in android default browser, is very simple, just now I have put myself to program and install all sdks, and I was able to compile apk, sending the tablet or cell, rather the applications. but certainly donot like I can do. passed me a link to a code they use the android sdk but my only experience is with blitz and other basics, java etc. zero. I'm not sure if you can implement or if there is a command that can serve me, for that String url = "http://www.YOUR-URL.com"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); Obviously that did not run in the monkey.. some expert who can help me? :) |
| ||
Have you tried the OpenURL command? http://www.monkeycoder.co.nz/docs/html/Modules_mojo.app.html#OpenUrl |
| ||
yes work! :3 thanks! ,, will modify some lines, because of principle gave me error but then walked Now I have to do as I add some nice background image :) Import mojo Class MyApp Extends App Method OnCreate() SetUpdateRate 60 End Method OnUpdate() If MouseHit(0) If MouseY() >0 OpenUrl "http://www.web.com" Else OpenUrl "mailto:admin@..." Endif Endif End Method OnRender() Cls DrawText "web.COM!, Clik to continue",DeviceWidth/2,DeviceHeight/2,.5,.5 End End Function Main() New MyApp End |
| ||
Or diddy.externfunctions.LaunchNativeBrowser() is also available. |
| ||
I've actually been meaning to remove that function from Diddy since Monkey now has the OpenURL command... It'll end up as a wrapper for OpenURL. |
| ||
Thank you a lot i was searching how to do that. |
| ||
Heh, I keep an old version of diddy.externfunctions which I have added to. A lot of stuff has become unnecessary now, but I've never been one to update working libraries... |