Android Question (rp.PERMISSION_WRITE_EXTERNAL_STORAGE) error in android 10

cambol

Active Member
Licensed User
This code don't work in android 10 , ( It work in android 7 )

java.io.fileNotFoundExcept:/storage/emulated/0/systemfirst/custmer.sql: openfailed:ENOENT (No such file or directory) Continue?


B4X:
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
  
  
    If Result = False Then
        MsgboxAsync("No permission to access phone storage", "")
        ExitApplication
    Else
        Dim mypath
        mypath=File.DirRootExternal & "/systemfirst"
        File.Copy(File.DirAssets,"custmer.sql",File.DirRootExternal & "/systemfirst","custmer.sql")
  
    End If
[CODE/]
 

cambol

Active Member
Licensed User
already add file.makedir ......
but , it didn't work. it didn't create direction in DirRootExternal . path

java error show. /storage/emulated/0/.... no path, so. copy file . failed
java.io.fileNotFoundExcept:/storage/emulated/0/systemfirst/custmer.sql: openfailed:ENOENT (No such file or directory) Continue?

B4X:
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
 
 
    If Result = False Then
        MsgboxAsync("No permission to access phone storage", "")
        ExitApplication
    Else
        Dim mypath
        mypath=File.DirRootExternal & "/systemfirst"
File.MakeDir(File.DirRootExternal,“systemfirst")      
  File.Copy(File.DirAssets,"custmer.sql",File.DirRootExternal & "/systemfirst","custmer.sql")
 
    End If
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…