Codesnippets > Inline / 3rd party

sending android intents

(1/1)

sf-in-sf:
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: ---String url = "http://www.example.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);

--- End code ---
or:

--- Code: ---startActivity(new Intent(Intent.ACTION_VIEW,
    Uri.parse("http://www.google.com")));

--- End code ---
(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!

Schranz0r:
you need the headers

coolo:
GLBasic already has a command to open the webbrowser: http://www.glbasic.de/xmlhelp.php?lang=en&id=367&action=view

sf-in-sf:

--- Quote from: Schranz0r on 2012-Jul-16 ---you need the headers

--- End quote ---

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...)

Navigation

[0] Message Index

Go to full version