Android Question file dialog not working in release mode

catyinwong

Active Member
Licensed User
Longtime User
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>
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…