Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   FireMonkey (https://www.clubdelphi.com/foros/forumdisplay.php?f=50)
-   -   Abrir Navegador por defecto con URL Android Delphi XE7 (https://www.clubdelphi.com/foros/showthread.php?t=88843)

wolfran_hack 12-08-2015 21:17:49

Abrir Navegador por defecto con URL Android Delphi XE7
 
Siempre utilice:

Código Delphi [-]
ShellExecute(0, 'OPEN', PChar('http://www.clubdelphi.com/'), '', '', SW_SHOWNORMAL);

¿Cómo puedo tener el mismo comportamiento (la apertura de un enlace en el navegador por defecto), en Android?

AgustinOrtu 12-08-2015 22:34:33

Con TWebBrowser?

wolfran_hack 12-08-2015 22:52:23

la idea es usar el navegador externo, chrome, firefox, opera, el que tenga el android.

AgustinOrtu 13-08-2015 00:40:06

En Firemonkey TWebBrowser es un wrapper del navegador nativo

aposi 13-08-2015 12:13:03

Código Delphi [-]

uses   
Androidapi.JNI.GraphicsContentViewText,   FMX.Helpers.Android;


procedure TForm3.Button1Click(Sender: TObject); 
var   Intent: JIntent; 
begin
   Intent := TJIntent.Create;
   Intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
   Intent.setData(StrToJURI('http://www.clubdelphi.com'));
   SharedActivity.startActivity(Intent);
 end;

wolfran_hack 14-08-2015 02:57:48

me da error en:

Intent.setData(StrToJURI('http://www.clubdelphi.com'));
SharedActivity.startActivity(Intent);

wolfran_hack 14-08-2015 05:07:48

Solucionado:

Código Delphi [-]
uses
  ..., Androidapi.Helpers;


La franja horaria es GMT +2. Ahora son las 08:18:56.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi