Android Question Can not Create a Folder or Copy files

Dogbonesix

Active Member
Licensed User
Longtime User
After SdkVersion="26" it seems I cannot create Folders and some problems with copying files. I have not spent too much time on copying files but getting frustrated with creating Folders - and I think the problems are related. Attached is a sample program - No errors but the Folder is not created. Any help is appreciated.
 

Attachments

  • TestFolder.zip
    8.9 KB · Views: 144

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Dogbonesix

Active Member
Licensed User
Longtime User
I added the RP permissions in the sample I had attached and placed 'Private rp As RuntimePermissions' in Process_Globals along with
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
in the manifest - and it works.

There is still a warning rp is never assigned any value. My sample was only an extract of a larger program and all of the changes already were implemented. At least I have a working sample. Thanks
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Here you go @Dogbonesix
B4X:
'Try this
    Dim RP As RuntimePermissions
        RP.CheckAndRequest(RP.PERMISSION_WRITE_EXTERNAL_STORAGE)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
    If Result Then
        Log("Permission granted")
    Else
        Log("Permission denied")
    End If

Enjoy...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…