Hi ,
can anyone please help me with this problem ? I have the standard code for copying a PDF file from DirAssets fo file.DirDefaultExternal to allow a PDF reader to open it as follows :
Android 7.1 device Samsung Galaxy A7 phone…... app crashes
Android 7.0 device Huawei P9 phone .........app does nor crash but i get this message " No apps can perform this action"
The error log reads as follows :
-----------------------------------------------------------------------------------------------------------------
Error occurred on line: 79 (BillList)
java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.example/files/fattura.pdf (No such file or directory)
-------------------------------------------------------------------------------------------------------------------
fattura.pdf exists in DirAssets as i have a sub that checks this and it returns positive.
Is this a runtime permission problem ?
In the Logs tab ---> List Permissions I have :
-----------------------------------------------------------------------------------------------------------------
FileDirRootExternal/File DirDefaultExternal
android.permission.WRITE_EXTERNAL_STORAGE*
------------------------------------------------------------------------------------------------------------------
Any help is greatly appreciated.
can anyone please help me with this problem ? I have the standard code for copying a PDF file from DirAssets fo file.DirDefaultExternal to allow a PDF reader to open it as follows :
B4X:
Dim I1 As Intent
Dim PDF_Filename As String = "fattura.pdf"
78 If File.Exists(File.DirAssets,PDF_Filename) = True Then
79 File.Copy(File.DirAssets,PDF_Filename,File.DirDefaultExternal,PDF_Filename)
80 End If
Android 7.1 device Samsung Galaxy A7 phone…... app crashes
Android 7.0 device Huawei P9 phone .........app does nor crash but i get this message " No apps can perform this action"
The error log reads as follows :
-----------------------------------------------------------------------------------------------------------------
Error occurred on line: 79 (BillList)
java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.example/files/fattura.pdf (No such file or directory)
-------------------------------------------------------------------------------------------------------------------
fattura.pdf exists in DirAssets as i have a sub that checks this and it returns positive.
Is this a runtime permission problem ?
In the Logs tab ---> List Permissions I have :
-----------------------------------------------------------------------------------------------------------------
FileDirRootExternal/File DirDefaultExternal
android.permission.WRITE_EXTERNAL_STORAGE*
------------------------------------------------------------------------------------------------------------------
Any help is greatly appreciated.