In Android I prefer the GoogleVision and in iOS I prefer use the apis of the AVFoundation, you will even avoid using TCamera, because it is very slow, very.Your problem on mobile can be related to the permission to have access to the camera and not in relation to the ZXing code.Here I use it only in windows, and with Delphi 10.4 is working fine.
![]() The code working on Delphi 10.3.3 is crashing on Delphi 10.4. Btw, if the user hasnt given permission to access the camera yet, heshe will be asked to give one. T he code working on Delphi 10.3.3 is crashing o n Delphi 10.4. If your user negate the permission once, he will need to give the permission manually at the Settings of the iOS. In iOS go to the Settings Your App enable Camera, and try again. I dont know why it is working for you in 10.3, probably the TCamera did it internally. Wrap ( TUIAlertController. OCClass. alertControllerWithTitle (. Wrap ( TUIAlertAction. OCClass. actionWithTitle ( StrToNSStr ( FMXLanguage. GetPermissionSettingsButtonText ), UIAlertActionStyleDefault, AlertSettings ))). ![]() If is denied I simple show a message informing to go to the Settings and enable the permission manually (all aps do this, example: Telegram). DisplayRationale ( Sender: TObject; const APermissions: TArray; const APostRationaleProc: TProc ). AccessCameraPermissionRequestResult ( Sender: TObject; const APermissions: TArray; const AGrantResults: TArray TPermissionStatus ). RequestPermissions ( FPermissionCamera, AccessCameraPermissionRequestResult, DisplayRationale ). RequestPermissions ( FPermissionCamera, ActivateCameraPermissionRequestResult, DisplayRationale ).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |