I have an android app that works fine on an Android v5 but not on v7 or v9.
On the V5 device, the ProfileResourceReceived is triggered but not on the v7 or v9 device.
What changed?
Is there a fix?
Delphi CE 10.3.2
The mobile app asks for the database: This works on all versions.
procedure TfrmMMMP.Get_Database;
begin
TabControl1.ActiveTab := tbtmhome;
tetprof.SendString(tetMan.RemoteProfiles[FRemProfIndex], 'Get_Database', 'Get_Database');
end;
The Server gets the db and streams it to the app: This is a VCL app. It catches the request from all versions.
procedure TfrmMMMPServer.thrprofServerResourceReceived(const Sender: TObject;
const AResource: TRemoteResource);
var
ms: TMemoryStream;
fs: TFilestream;
LStream : TMemoryStream;
begin
if (AResource.Hint <> '') and (AResource.Hint <> 'ClientLog') then
ToTheLog('> AResource.Hint: ', AResource.Hint);
if AResource.Hint = 'Get_Database' then
begin
if Connected then
begin
ms := tmemorystream.Create;
ms := dmMMMPServerVCL.GetDbAsStream;
ms.Position := 0;
thrprofServer.SendStream(thrmanServer.RemoteProfiles.First,
'Here_TheDB', ms);
end
The app catches the Response and populates a ListBox: This does not trigger on Ver 7 or Ver 9.
procedure TfrmMMMP.tetProfResourceReceived(const Sender: TObject;
const AResource: TRemoteResource);
begin
if AResource.Hint = 'Here_TheDB' then
begin
DoStreamTheDb(AResource);
DoFillLB(lbxRecipeNames);
tabcontrol1.ActiveTab := TbtmRecipes;
end