Comments (12)
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.
from mobilepermissions.
Of course, in administrator mode I tried to install.
from mobilepermissions.
from mobilepermissions.
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.
Hi,
I'm sorry. Would you like to make a Pull Request on the component?
We can analyze and merge.
Thanks
from mobilepermissions.
No problem. I'll do. :)
from mobilepermissions.
PR accepted. Thanks very much Patrick.
from mobilepermissions.
AnonBitComment
Managed to solve the problem? I'm in the same situation.
from mobilepermissions.
Hi @beniltonrs
Can you explain it in a new issue ? Have you updated the library/component in your program ?
from mobilepermissions.
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.
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)
- TMobilePermissionsAndroid.SetAndroidVersion error on androd 5.1 HOT 3
- Component is not asking for the necessary rights HOT 2
- Android 11 Error HOT 1
- ACCESS BACKGROUND LOCATION not found to apply it on Android11 HOT 3
- New bug in version info HOT 1
- Error Incompatible Types JString and String HOT 5
- Erro CALL_COMPANION_APP Delphi 11 HOT 5
- Erro ao instalar no Delphi 11.1 O sistema não pode encontrar o arquivo especificado MobilePermissions.bpl HOT 2
- Component does not work in Delphi 11.2 Patch 1 HOT 7
- Mobile Components does not work at all. MobilePermissions.Component HOT 5
- Error MobilePermissions.Component.hpp HOT 5
- error permission on android 10 HOT 4
- erro ao compilar... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobilepermissions.