Delphi Android API 26 FileURIExposed

Delphi Android API 26 FileURIExposed

美好的一天, 所以我成功地将我的 delphi 应用程序升级到 API 26(我目前正在使用 Rad Studio 10.1 Berlin)一切正常,除了在 Android 6+ 设备上拍照,我得到以下信息错误:

还有我的代码:

procedure TF_SS_MAIN.ListBoxItem_menu_pictureClick(Sender: TObject);
var
  Service: IFMXCameraService;
  Params: TParamsPhotoQuery;
begin
  {$IFDEF Android}
  if TOSVersion.Check(6, 0) then
  begin
    try
      //Android 6+ stuff goes here, if basically I put the same code down below it crashes
    except
      on E: Exception do
        ShowMessage(E.Message);
    end;
  end
  else
  {$ENDIF}
  if TPlatformServices.Current.SupportsPlatformService(IFMXCameraService, Service) then
  begin
    Params.Editable := true;
    // Specifies whether to save a picture to device Photo Library
    Params.NeedSaveToAlbum := false;
    // Params.RequiredResolution := TSize.Create(2736, 4864);
    Params.RequiredResolution := TSize.Create(2500, 2500);
    // Params.
    Params.OnDidFinishTaking := DoDidFinish;

    Service.TakePhoto(nil, Params);

    TabItem_picture.Visible := true;
    TabControl.ActiveTab := TabItem_picture;
  end
  else
    ShowMessage('This device does not support the camera service');
end;

似乎在 10.1 Berlin 中没有办法做到这一点,我尝试了外部 URi 但它不起作用,所以最好的情况是使用 Remy Lebeau 的建议并获得专门针对 10.3 Rio 更新API26+