This is what i got, in "uses" :
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils, AndroidWidget, Laz_And_Controls, ZConnection, ZDataset, And_jni,
framelayout, stablayout, tablelayout, linearlayout ,
unit2 ;
and then when I call AndroidModule2 :
if AndroidModule2 = nil then
gApp.CreateForm(TAndroidModule2, AndroidModule2);
AndroidModule2.MoveTaskToFront();
AndroidModule2.BackgroundColor:=colbrWhite;
AndroidModule2.InitShowing;
And then the called module (form) is shown.
From that one , i want to go back, exti from AndroidMdule2 to AndroidModule1 :
procedure TAndroidModule2.Button1Click(Sender: TObject);
begin
self.Finish;
end;
Called form2 is displayed, works as expected.
When i press the button to go back to form1 it takes me back, as it is expected (the line with self.finish).
Now if i want to go to form2 again it crashes and gets out of the application.