Android Question Contact Firebase Via TclHttp

ziz

Member
Hello You All

I tried all possible ways via the libraries that are here to connect fieebase and it didn't work
my question is :
1: Is it possible to connect via TclHttp on Basic for Android?
2: Is this library available on Basic for Android?

An example of Delphi language

C#:
function TFirebase.Get(Database: string): String;
var
  Response: TMemoryStream;
  FireBase: TclHttp;
  Ts: TStringList;
begin
  Response := TMemoryStream.Create;
  FireBase := TclHttp.Create(nil);
Ts := TStringList.Create;
  try

    FireBase.Get(ProjectUrl + Database   + '.json' + '?auth=' + SecretKey, Response);
    Response.Position := 0;
   Ts.LoadFromStream(Response, TEncoding.UTF8);
    Result := Ts.Text;
  finally
     if Assigned(Ts) then
    FreeAndNil(Ts);

    if Assigned(Response) then
      FreeAndNil(Response);

    if Assigned(FireBase) then
      FreeAndNil(FireBase);
  end;
end;
 
Top