Author Topic: sending android intents  (Read 2570 times)

Offline sf-in-sf

  • Mr. Drawsprite
  • **
  • Posts: 93
  • Artist F.P. Brixey
    • View Profile
    • My computed art project
sending android intents
« 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!
On the day the atom is a cube I will start believing in the square pixel.

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5022
  • O Rly?
    • View Profile
Re: sending android intents
« Reply #1 on: 2012-Jul-16 »
you need the headers
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: sending android intents
« Reply #2 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
That's no Bug, that's my project!

http://programming-with-design.at/

Offline sf-in-sf

  • Mr. Drawsprite
  • **
  • Posts: 93
  • Artist F.P. Brixey
    • View Profile
    • My computed art project
Re: sending android intents
« Reply #3 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...)
On the day the atom is a cube I will start believing in the square pixel.