Code Monkey home page Code Monkey logo

Comments (12)

beniltonrs avatar beniltonrs commented on July 21, 2024 1

Esta unidade não faz parte deste repositório de código. Você tem que aplicar a mesma correção que fiz aqui. olha o código

Se você não vê o que fazer, veja este commit: 468b227 #diff-29712fca002a605015ea871f24fa57bd1e087913c0c1dbd6243dce152824dc47

Thank you very much, I managed to solve it.

from mobilepermissions.

adrianosantostreina avatar adrianosantostreina commented on July 21, 2024

from mobilepermissions.

AnonBit avatar AnonBit commented on July 21, 2024

Of course, in administrator mode I tried to install.

from mobilepermissions.

adrianosantostreina avatar adrianosantostreina commented on July 21, 2024

from mobilepermissions.

DeveloppeurPascal avatar DeveloppeurPascal commented on July 21, 2024

hi

In Alexandria the RequestPermission signature has changed to

procedure TPermissionsService.RequestPermissions(const APermissions: TArray;
const AOnRequestPermissionsResult: TRequestPermissionsResultProc; AOnDisplayRationale: TDisplayRationaleProc);

with changes on types

TRequestPermissionsResultProc = reference to procedure(const APermissions: TClassicStringDynArray;
const AGrantResults: TClassicPermissionStatusDynArray);
TClassicStringDynArray= array of string;
TClassicPermissionStatusDynArray = array of TPermissionStatus;

TArray<> can't be used anymore in this case. Probably a change in the compiler.

from mobilepermissions.

adrianosantostreina avatar adrianosantostreina commented on July 21, 2024

Hi,

I'm sorry. Would you like to make a Pull Request on the component?
We can analyze and merge.

Thanks

from mobilepermissions.

DeveloppeurPascal avatar DeveloppeurPascal commented on July 21, 2024

No problem. I'll do. :)

from mobilepermissions.

adrianosantostreina avatar adrianosantostreina commented on July 21, 2024

PR accepted. Thanks very much Patrick.

from mobilepermissions.

beniltonrs avatar beniltonrs commented on July 21, 2024

AnonBitComment

Managed to solve the problem? I'm in the same situation.

from mobilepermissions.

DeveloppeurPascal avatar DeveloppeurPascal commented on July 21, 2024

Hi @beniltonrs
Can you explain it in a new issue ? Have you updated the library/component in your program ?

from mobilepermissions.

beniltonrs avatar beniltonrs commented on July 21, 2024

In delphi 10.3 it was like this and it worked already in 11 there is the error after the code

unit Providers.Permission.Camera;

interface

uses
System.Classes,
{$IFDEF ANDROID}
Androidapi.Helpers,
Androidapi.JNI.JavaTypes,
Androidapi.JNI.OS,
{$ENDIF}
System.SysUtils,
System.Permissions,
FMX.DialogService,
System.UITypes;

type
TCameraPermision = class
private
FPermissionCamera: string;
FPermissionReadExternalStorage: string;
FPermissionWriteExternalStorage: string;
procedure ValidadePermisionRequest(Sender: TObject; const APermissions: TArray; const AGrandResult: TArray);
constructor Create;
public
class function New: TCameraPermision;
procedure Request;
end;

implementation

constructor TCameraPermision.Create;
begin
{$IFDEF ANDROID}
FPermissionCamera := JStringToString(TJManifest_permission.JavaClass.CAMERA);
FPermissionReadExternalStorage := JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE);
FPermissionWriteExternalStorage := JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE);
{$ENDIF}
end;

class function TCameraPermision.New: TCameraPermision;
begin
Result := TCameraPermision.Create;
end;

procedure TCameraPermision.Request;
begin
PermissionsService.RequestPermissions(
[FPermissionCamera,
FPermissionReadExternalStorage,
FPermissionWriteExternalStorage],
ValidadePermisionRequest);
end;

procedure TCameraPermision.ValidadePermisionRequest(Sender: TObject;
const APermissions: TArray;
const AGrandResult: TArray);
begin
Self.DisposeOf;
end;

end.

[DCC Error] Providers.Permission.Camera.pas(52): E2250 There is no overloaded version of 'RequestPermissions' that can be called with these arguments
[DCC Fatal Error] Views.Perfil.pas(59): F2063 Could not compile used unit 'Providers.Permission.Camera.pas'
Failed

from mobilepermissions.

DeveloppeurPascal avatar DeveloppeurPascal commented on July 21, 2024

This unit is not part of this code repository. You have to apply the same fix as I've done here. Look at the code

If you don't see what to do, look at this commit : 468b227#diff-29712fca002a605015ea871f24fa57bd1e087913c0c1dbd6243dce152824dc47

from mobilepermissions.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.