Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Desarrollo en Delphi para Android
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos


Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 30-01-2018
Avatar de kurono
[kurono] kurono is offline
Miembro Premium
 
Registrado: jul 2007
Ubicación: Republica Dominicana
Posts: 1.126
Poder: 18
kurono Va por buen camino
problema con el WebBrowser en delphi xe7 android

hola amigos les cuento que el WebBrowser no me funciona en android cuando pongo el componente al inicial la aplicacion se queda la pantalla en negro y no inicia intente poner solo el WebBrowser en un formulario en blanco y nada mas y aun asi no fuciona cual puede ser el problema
Responder Con Cita
  #2  
Antiguo 30-01-2018
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.220
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
¿Puedes poner los USES que has usado en la unit?
¿O el código de la unit?
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #3  
Antiguo 31-01-2018
Avatar de kurono
[kurono] kurono is offline
Miembro Premium
 
Registrado: jul 2007
Ubicación: Republica Dominicana
Posts: 1.126
Poder: 18
kurono Va por buen camino
aqui esta el codigo completo la compilacion original fue hecha en delphi Xe5 luego la compile en Xe6 en ambas versiones Funcionaba perfectamente y ahora en Xe7 que no se por que se queda con la pantalla negra
Código Delphi [-]
unit LocationDemoUnit;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Objects, FMX.StdCtrls,
  FMX.ListBox, FMX.Layouts, System.Sensors, FMX.MobilePreview,Google.Maps,
  System.Rtti, FMX.Edit, FMX.DateTimeCtrls, FMX.Grid, FireDAC.Stan.Intf,
  FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf,
  FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys,
  Data.DB, FireDAC.Comp.Client,System.IOUtils, FireDAC.Stan.Param, FireDAC.DatS,
  FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Stan.ExprFuncs, FireDAC.FMXUI.Wait,
  FireDAC.Comp.UI, FireDAC.Phys.SQLite, FireDAC.Comp.DataSet, Data.Bind.EngExt,
  Fmx.Bind.DBEngExt, System.Bindings.Outputs, Fmx.Bind.Editors,
  Data.Bind.Components, Data.Bind.DBScope, FireDAC.Phys.SQLiteDef, FMX.Calendar,
  FMX.Controls.Presentation, System.Sensors.Components, FMX.WebBrowser;

type
  TForm1 = class(TForm)
    LocationSensor1: TLocationSensor;
    Line2: TLine;
    Panel2: TPanel;
    StyleBook1: TStyleBook;
    BDGps: TFDConnection;
    tbl_datos: TFDTable;
    FDPhysSQLiteDriverLink1: TFDPhysSQLiteDriverLink;
    FDGUIxWaitCursor1: TFDGUIxWaitCursor;
    Timer1: TTimer;
    BindSourceDB1: TBindSourceDB;
    BindingsList1: TBindingsList;
    BindSourceDB2: TBindSourceDB;
    cons_velocidad: TFDQuery;
    Panel5: TPanel;
    Label7: TLabel;
    txt_latitud: TEdit;
    Panel6: TPanel;
    Label2: TLabel;
    txt_longitud: TEdit;
    Panel7: TPanel;
    Label3: TLabel;
    Switch1: TSwitch;
    Panel8: TPanel;
    Label1: TLabel;
    txt_hasta: TTimeEdit;
    Panel1: TPanel;
    Label4: TLabel;
    Panel9: TPanel;
    Label8: TLabel;
    Panel10: TPanel;
    Panel11: TPanel;
    Label9: TLabel;
    txt_desde: TTimeEdit;
    Label5: TLabel;
    txt_calendario: TCalendar;
    WebBrowser1: TWebBrowser;
    procedure LocationSensor1LocationChanged(Sender: TObject; const OldLocation,
      NewLocation: TLocationCoord2D);
    procedure Switch1Switch(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure txt_calendarioChange(Sender: TObject);
    procedure txt_hastaClosePicker(Sender: TObject);
  private
    { Private declarations }
     FGeocoder: TGeocoder;
    procedure OnGeocodeReverseEvent(const Address: TCivicAddress);
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}
procedure TForm1.Switch1Switch(Sender: TObject);
begin
  LocationSensor1.Active := Switch1.IsChecked;
  Timer1.Enabled:= Switch1.IsChecked;
end;

procedure TForm1.txt_hastaClosePicker(Sender: TObject);
var
  Map: TGoogleMap;
  a:Integer;
begin
  a:=0;
  Map:=TGoogleMap.Create;
  try
    Map.MapFormat:=mfPNG32;
    Map.MapType:=mtRoadmap;

    Map.Paths.Add(TMapPath.Create);
    Map.Paths.Last.ColorAlpha:=255;

    Map.Paths.Last.Color:=TColorRec.Blue;
    Map.Paths.Last.Weight:=2;

    while not tbl_datos.Eof do
    begin
      if  (tbl_datos.FieldValues['HORA']>= TimeToStr(txt_desde.Time)) and (tbl_datos.FieldValues['HORA']<= TimeToStr(txt_hasta.Time)) and (tbl_datos.FieldValues['FECHA'] = DateToStr(txt_calendario.Date)) then
        begin
           a:=a+1;
           Map.Paths.Last.PathData.Add(TMapPoint.Create(tbl_datos.FieldValues['LATITUD'],tbl_datos.FieldValues['LONGITUD']));
           WebBrowser1.Navigate(Map.URL);
        end;
           tbl_datos.Next;
     end;
   finally
    // txt_tiempo.Text:=IntToStr(a)+ ' Min';
     tbl_datos.First;
     Map.Free;
   end;
 end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
 try
   if LocationSensor1.Sensor.Speed > 1 then
  begin
   if (txt_latitud.Text <> '') and (txt_longitud.Text <> '') then
   begin
    tbl_datos.Insert;

    tbl_datos.FieldByName('FECHA').Value:=DateToStr(Date);
    tbl_datos.FieldByName('HORA').Value:=TimeToStr(Time);
    tbl_datos.FieldByName('LATITUD').Value:= FormatFloat(',.000000',LocationSensor1.Sensor.Latitude);
    tbl_datos.FieldByName('LONGITUD').Value:= FormatFloat(',.000000',LocationSensor1.Sensor.Longitude);

    tbl_datos.Post;
     end;
    end;
   except
    ShowMessage('Error en Guardar los Datos');
   end;
 end;

procedure TForm1.txt_calendarioChange(Sender: TObject);
var
  Map: TGoogleMap;
  a:Integer;
begin
  a:=0;
  Map:=TGoogleMap.Create;
  try
    Map.MapFormat:=mfPNG32;
    Map.MapType:=mtRoadmap;

    Map.Paths.Add(TMapPath.Create);
    Map.Paths.Last.ColorAlpha:=255;

    Map.Paths.Last.Color:=TColorRec.Blue;
    Map.Paths.Last.Weight:=2;

    while not tbl_datos.Eof do
    begin
      if  tbl_datos.FieldValues['FECHA'] = DateToStr(txt_calendario.Date) then
        begin
           a:=a+1;
           Map.Paths.Last.PathData.Add(TMapPoint.Create(tbl_datos.FieldValues['LATITUD'],tbl_datos.FieldValues['LONGITUD']));
           WebBrowser1.Navigate(Map.URL);
        end;
           tbl_datos.Next;
     end;
   finally
     //txt_tiempo.Text:=IntToStr(a)+ ' Min';
     tbl_datos.First;
     Map.Free;
  end;
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
  BDGps.Params.Values['Database'] := TPath.Combine(TPath.GetSharedDocumentsPath, '/sdcard/BdCoordenadas.db');
 try       //Conexion a la base de datos
   begin
    BDGps.Connected := True;
    tbl_datos.Active:= True
    end;
   except
    on E: EDatabaseError do
       ShowMessage('Error en la Conexion' + E.Message);
 end;
end;

procedure TForm1.LocationSensor1LocationChanged(Sender: TObject;
  const OldLocation, NewLocation: TLocationCoord2D);
var
  URLString: String;
  LLatitude, LLongitude : string;
  LSettings: TFormatSettings;
  LDecSeparator : Char;
begin
  LDecSeparator := FormatSettings.DecimalSeparator;
  LSettings := FormatSettings;
  try
    FormatSettings.DecimalSeparator := '.';
    // Show current location
    txt_latitud.Text  := Format('%2.6f', [NewLocation.Latitude]);
    txt_longitud.Text := Format('%2.6f', [NewLocation.Longitude]);

   finally
    FormatSettings.DecimalSeparator := LDecSeparator;
  end;
end;

Última edición por kurono fecha: 31-01-2018 a las 01:28:38.
Responder Con Cita
  #4  
Antiguo 01-02-2018
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.220
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
No veo nada raro en el código que has puesto.
Por probar, yo desconectaría los eventos o comentaría código para las pruebas. Para detectar posibles errores en el código o en el DFM.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #5  
Antiguo 02-02-2018
Avatar de kurono
[kurono] kurono is offline
Miembro Premium
 
Registrado: jul 2007
Ubicación: Republica Dominicana
Posts: 1.126
Poder: 18
kurono Va por buen camino
esa prueba ya la hice quite el componente WebBrowser y la aplicacion funciona pongo de nuevo el WebBrowser y se queda la aplicacion en negro al inicialse
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
problema con base de datos+android+delphi xe6 jgutti Desarrollo en Delphi para Android 7 22-08-2016 21:32:24
Problema con Android 5.0 y delphi xe8 Galahad FireMonkey 8 12-10-2015 18:57:50
Problema con WebBrowser. Uno más. Jontart Internet 8 14-03-2015 14:48:05
Ayuda con WebBrowser en android kurono Desarrollo en Delphi para Android 3 24-05-2014 08:12:02
Problema con WebBrowser y OnNewWindow jomadi04 Internet 3 01-06-2011 10:53:09


La franja horaria es GMT +2. Ahora son las 06:05:27.


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
Copyright 1996-2007 Club Delphi