Hi!
I try to open a ZIP file which was selected by the ContentChooser. But it fails:
And I get always this exception:
java.io.IOException: java.io.FileNotFoundException: ContentDir/content:/com.alphainventor.filemanager.fileprovider/root/storage/emulated/0/Backup/PB-Backup.zip: open failed: ENOENT (No such file or directory)
Dir is : ContentDir/
FileName is: content:/com.alphainventor.filemanager.fileprovider/root/storage/emulated/0/Backup/PB-Backup.zip
SDK is >= 26
For FileProvider (which is used in my app) the manifest file is correctly set:
Who can help here?
Thanks in advance.
Regards
ARTsoft
I try to open a ZIP file which was selected by the ContentChooser. But it fails:
B4X:
Sub Process_Globals
Public zipChooser As ContentChooser
End Sub
Sub handleImport()
If (zipChooser.IsInitialized == False) Then
zipChooser.Initialize("zipChooser")
End If
zipChooser.show("application/zip", "Please select zip file")
End Sub
Sub zipChooser_Result(Success As Boolean, Dir As String, FileName As String)
If Success Then
Private arc As Archiver
Private out_tmp As String = File.Combine(File.DirInternal, "tmp_")
File.MakeDir("", out_tmp)
Private files_count As Int = arc.UnZip(Dir, FileName, out_tmp, "unzipping")
Log(files_count)
End If
End Sub
And I get always this exception:
java.io.IOException: java.io.FileNotFoundException: ContentDir/content:/com.alphainventor.filemanager.fileprovider/root/storage/emulated/0/Backup/PB-Backup.zip: open failed: ENOENT (No such file or directory)
Dir is : ContentDir/
FileName is: content:/com.alphainventor.filemanager.fileprovider/root/storage/emulated/0/Backup/PB-Backup.zip
SDK is >= 26
For FileProvider (which is used in my app) the manifest file is correctly set:
B4X:
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"
/>
</provider>
)
'
CreateResource(xml, provider_paths,
<files-path name="name" path="shared" />
)
Who can help here?
Thanks in advance.
Regards
ARTsoft