Recent

Author Topic: Bug in RequestRuntimePermission causes a fatal error and closes the application  (Read 2866 times)

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Hi guys, I found an error when the function is called: "RequestRuntimePermission" with several permissions, once this function is called it causes a fatal error and closes the application.

Code: Pascal  [Select][+][-]
  1.       SetLength(manifestPermissions, 2);
  2.  
  3.       manifestPermissions[0]:= 'Manifest.permission.CAMERA';  //from AndroodManifest.xml
  4.       manifestPermissions[1]:= 'Manifest.permission.WRITE_EXTERNAL_STORAGE'; //from AndroodManifest.xml
  5.  
  6.       // When this function is called, it causes a fatal error and closes the application
  7.       Self.RequestRuntimePermission(manifestPermissions, 1001);
  8.  
  9.       SetLength(manifestPermissions, 0);
  10.  

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Hi, TR3E

What a about   "Run" ---> "Clean up and Build"?


EDITED:

from "AndroodManifest.xml":

manifestPermissions[0]:= 'android.permission.CAMERA';
manifestPermissions[1]:= 'android.permission.WRITE_EXTERNAL_STORAGE';

« Last Edit: October 15, 2018, 09:27:45 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Hi, TR3E

What a about   "Run" ---> "Clean up and Build"?


EDITED:

from "AndroodManifest.xml":

manifestPermissions[0]:= 'android.permission.CAMERA';
manifestPermissions[1]:= 'android.permission.WRITE_EXTERNAL_STORAGE';

Thanks, update to the latest version of LAMW and it works correctly.

 

TinyPortal © 2005-2018