GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: sf-in-sf on 2012-Jul-16

Title: sending android intents
Post by: sf-in-sf on 2012-Jul-16
Hi!
Someone already asked how to open a web browser with given url in iOS.
I have the same question for android.
Here are some guidelines, but they are written in java:
Code: GLBasic [Select]
String url = "http://www.example.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
 
or:
Code: GLBasic [Select]
startActivity(new Intent(Intent.ACTION_VIEW,
    Uri.parse("http://www.google.com")));
 
(http://stackoverflow.com/questions/3004515/android-sending-an-intent-to-browser-to-open-specific-url)
How can we adapt that for some C inline code in GLbasic?
Many thanks in advance!
Title: Re: sending android intents
Post by: Schranz0r on 2012-Jul-16
you need the headers
Title: Re: sending android intents
Post by: metzzo on 2012-Jul-19
GLBasic already has a command to open the webbrowser: http://www.glbasic.de/xmlhelp.php?lang=en&id=367&action=view (http://www.glbasic.de/xmlhelp.php?lang=en&id=367&action=view)
Title: Re: sending android intents
Post by: sf-in-sf on 2012-Jul-21
you need the headers

Thanks. Can you explain a bit which headers are necessary? Using intents should be useful to open a native keyboard as well, when necessary. (i'm aware of the IMPUT code, but...)