Jump to content

xorpas

Members
  • Content Count

    90
  • Joined

  • Last visited

Posts posted by xorpas


  1. I use exoplayer jar to play mp4 using alcino when run apk I get this error 

    Project1.apk raised exception class EJNI with message 'Java type JExoPlayer_Builder could not be found'.

     i add 4 jar files  exoplayer-core.jar,  exoplayer-dash.jar, exoplayer-hls.jar , exoplayer-ui.jar ,

    how reolve it ?


  2. I have a problem ,when i click on the edit of rest debugger the keyboard  is showing  ,the same as when create app in delphi with edit the controltype is styled by default , when clicked on the edit the keyboard runing but when change the default to (platform) the edit not run the virtual keyboard , i think that the problem is in the unit fmx.control for that i change the default controltype for show platform as  default that can appears instead of styled but also not work 

     

    picture 

    1.thumb.png.883c58dbdcfa38e455d8678d89b7c160.png2.thumb.png.723b1fc35017a763c49a5eaecb15c4b8.png3.thumb.png.d5d3adb4995301737fd0cc8586a39ad4.png


  3. how can create a round picture from bitmap  i check this code from chatgpt but not work  it save the image as it

     procedure SaveRoundedImage(SourceImage: TBitmap; SavePath: string);
    var
      RoundedImage: TBitmap;
      RoundedRect: TRectF;
    begin
      // Create a new bitmap for the rounded image
      RoundedImage := TBitmap.Create;
      try
        RoundedImage.SetSize(round(SourceImage.Width), round(SourceImage.Height));
    
        // Clear the bitmap (transparent background)
        RoundedImage.Clear(TAlphaColors.Null);
    
        // Create a rounded rectangle
        RoundedRect := TRectF.Create(0, 0, RoundedImage.Width, RoundedImage.Height);
        RoundedRect.Inflate(-0, -0);
    
        // Draw the rounded image onto the new bitmap
        RoundedImage.Canvas.BeginScene;
        try
          RoundedImage.Canvas.Fill.Color := TAlphaColors.White; // Fill with white background
          RoundedImage.Canvas.DrawRect(TRectF.Create(10, 10, 200, 270),
                                     30, 60,
                                     AllCorners, 100,
                                     TCornerType.ctRound);
          RoundedImage.Canvas.DrawBitmap(SourceImage,
            TRectF.Create(0, 0, SourceImage.Width, SourceImage.Height),
            TRectF.Create(0, 0, RoundedImage.Width, RoundedImage.Height), 1.0, True);
        finally
          RoundedImage.Canvas.EndScene;
        end;
    
        // Save the rounded image to a file
        RoundedImage.SaveToFile(SavePath);
      finally
        RoundedImage.Free;
      end;
    end;

     


  4. I have an issue with firebase send phone verification code  

     

    format('https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?key=%s',[FIREBASE_API_KEY])

     i think it need a captcha or a token 

    get this error   

    {
      "error": {
        "code": 400,
        "message": "MISSING_REQ_TYPE",
        "errors": [
          {
            "message": "MISSING_REQ_TYPE",
            "domain": "global",
            "reason": "invalid"
          }
        ]
      }
    }

     


  5.  i have an issu with FireDac  it store  Arabic characters as  question marks (???)

    code create database at runtime is 

    var
      SQL: string;
      FConnection: TFDConnection;
    begin
      FConnection := TFDConnection.Create(nil);
      FConnection.DriverName := 'SQLite';
      FConnection.Params.Add('OpenMode=CreateUTF8');
      FConnection.Params.Add('CharacterSet=UTF8');
      FConnection.Params.Database := DB;
      FConnection.Open;
      SQL := 'CREATE TABLE Contact (ID INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT, Phone TEXT, Img BLOB)';
      FConnection.Open;
      FConnection.ExecSQL(SQL);
      FConnection.Close;

    and insert is 

    Connection := TFDConnection.Create(nil);
      Connection.DriverName := 'SQLite';
      Connection.Params.Database := DB;
      Connection.Params.Add('OpenMode=CreateUTF8');
      Connection.Params.Add('CharacterSet=UTF8');
      Connection.Open;
      Query := TFDQuery.Create(nil);
      Query.Connection := Connection;
     
      begin
        Query.SQL.Text :=
          'INSERT INTO Contact (Name, Phone, Img) VALUES (:Name, :Phone, :Img)';
        if Param[0] = '' then
          exit;
        if Param[1] = '' then
          exit;
        begin
         Query.ParamByName('Name').AsString := (Param[0]);
          Query.ParamByName('Phone').AsString := Param[1];
          stream := TMemoryStream.Create;
          if Param[2] = 'nil' then
          begin
    
          end
          else
          begin
            stream.LoadFromFile(Param[2]);
            Query.ParamByName('Img').LoadFromStream(stream, ftBlob);
          end;
    
          Query.ExecSQL;
          stream.Free;
        end;
    
      end;

    help to solve this issue

     

    Untitled.png.0e0500aa76d2bd2e2cee5f47a13f7973.png


  6. I resolve it by add code international at first of phone number  but still not work   get this error   

    {
      "error": {
        "code": 400,
        "message": "MISSING_REQ_TYPE",
        "errors": [
          {
            "message": "MISSING_REQ_TYPE",
            "domain": "global",
            "reason": "invalid"
          }
        ]
      }
    }

×