hi
i have uploaded my old app to use FileProvider to upload or share files (as erel suggested)
my problem is that i am using backup files to backup all my data and allow to upload to google drive or share with any other option like email,..
i also save the file in the shared folder (shared = rp.GetSafeDirDefaultExternal("shared")) to let the user restore all his data to a previous point by loading an older backup.
anyway, everything is working fine my only problem is that when the user has deleted the app accidentally the all files in that shared folder are deleted. what possibilities do i have now? should i go back to "File.DirDefaultExternal" ??
my second question is. i used this code in the past to show an image with the default gallery viewer
but now its not working anymore, how can i use FileProvider for this?
i tried this but i get a message that the file was not found. but the file is there i even get true if i check if the file exists.
i have uploaded my old app to use FileProvider to upload or share files (as erel suggested)
my problem is that i am using backup files to backup all my data and allow to upload to google drive or share with any other option like email,..
i also save the file in the shared folder (shared = rp.GetSafeDirDefaultExternal("shared")) to let the user restore all his data to a previous point by loading an older backup.
anyway, everything is working fine my only problem is that when the user has deleted the app accidentally the all files in that shared folder are deleted. what possibilities do i have now? should i go back to "File.DirDefaultExternal" ??
my second question is. i used this code in the past to show an image with the default gallery viewer
B4X:
'
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(Starter.shared, uri))
i.SetType("image/*")
StartActivity(i)
but now its not working anymore, how can i use FileProvider for this?
i tried this but i get a message that the file was not found. but the file is there i even get true if i check if the file exists.
B4X:
Dim i As Intent
i.Initialize(i.ACTION_VIEW, CreateFileProviderUri(Starter.shared, uri))
i.SetType("image/*") 'it is not related to the file itself.
StartActivity(i)