C catyinwong Active Member Licensed User Longtime User Jul 16, 2020 #1 I have the following code which works well in debug mode, but it cannot show/search any file in release mode. anyone knows how to fix it? <code> Dim fd as filedialog fd.filepath = "storage/emulated/0/documents/" fd.filefilter = ".xls" dim sf as object = fd.showasync("choose a file","confirm","","cancel",null,false) </code>
I have the following code which works well in debug mode, but it cannot show/search any file in release mode. anyone knows how to fix it? <code> Dim fd as filedialog fd.filepath = "storage/emulated/0/documents/" fd.filefilter = ".xls" dim sf as object = fd.showasync("choose a file","confirm","","cancel",null,false) </code>
DonManfred Expert Licensed User Longtime User Jul 16, 2020 #2 Use code tags when posting code. Make sure to use Runtimepermissions and request permission for the path used. Upvote 0
Use code tags when posting code. Make sure to use Runtimepermissions and request permission for the path used.
C catyinwong Active Member Licensed User Longtime User Jul 16, 2020 #3 how to check permission for a specific path? Upvote 0
C catyinwong Active Member Licensed User Longtime User Jul 16, 2020 #5 DonManfred said: Search for Runtimepermissions Click to expand... actually I did. but I can't find the answer. And rp makes more questions because the checkandrequest function does not "request" so it is no help to me Attachments Filedialog.zip 8.3 KB · Views: 258 Upvote 0
DonManfred said: Search for Runtimepermissions Click to expand... actually I did. but I can't find the answer. And rp makes more questions because the checkandrequest function does not "request" so it is no help to me
Erel B4X founder Staff member Licensed User Longtime User Jul 16, 2020 #6 Many mistakes here. Take 20 minutes and watch the video tutorial about runtime permissions. It will save you a lot of time. 1. Click on List Permissions (in the logs tab). You will see that no permission is marked as dangerous permission. 2. Remove this: B4X: AddManifestText(<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> ) 3. Add this: B4X: AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) 4. Remove Activity_PermissionResult and learn how to use Wait For. Upvote 0
Many mistakes here. Take 20 minutes and watch the video tutorial about runtime permissions. It will save you a lot of time. 1. Click on List Permissions (in the logs tab). You will see that no permission is marked as dangerous permission. 2. Remove this: B4X: AddManifestText(<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> ) 3. Add this: B4X: AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) 4. Remove Activity_PermissionResult and learn how to use Wait For.