Android Question Where is Provider.SharedFolder?

mmieher

Active Member
Licensed User
Longtime User
I know a file in this folder exits because I mail it to myself. I cannot find it using any Android file manager. Only programmatically.

B4X:
Dim darnFolder As String = Provider.SharedFolder
Log("darnFolder:  " & darnFolder)

The log shows:
darnFolder: /data/user/0/com.marcsmart.aaphonelist/files/shared

My real question is where to put a temporary file that I can find with a file manager? Device does not have external storage ("real SD Card or mass storage device only" - @DonManfred ). But where is the Download folder?

Have tried
B4X:
File.DirInternal
File.DirRootExternal
xui.DefaultFolder
Provider.SharedFolder
 

mmieher

Active Member
Licensed User
Longtime User
It is inside File.DirInternal on Android 7+ devices.
Thanks, Erel(s).

Well under File.DirInternal, I see a Download folder, but nothing is in it. DCIM has a Camera folder, but it is not in there either. Where is Mr. phonelist.pdf?
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
If that is your real question, and you are asking where can you put the file from within your app, then this is where you will find the answer ...

SaveAs - Let the user select a target folder + list of other related methods
Thanks, Brian. I don't want the user to have to do anything. I am trying to generate a pdf (done) then just display the dog-gone thing. The pdf is just sitting in this nice little pdf object and all I want to do is pdf.WriteToStream somewhere I can find it again. The user can then share, save, print or whatever. All the pdf readers require a FILE and DIR as parameters.
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
... all I want to do is pdf.WriteToStream somewhere I can find it again.
That is what I suspected. With the latest Android release you cannot write any data into any storage that is accessible to other apps without first getting the User's agreement (unless you have got special dispensation from Google). If you were writing this app for your own use you could compile it against an earlier SDK level, but not if you want to release to the Playstore.
 
Upvote 0

mmieher

Active Member
Licensed User
Longtime User
Okay, Fellas. Thank you for teaching me.

I guess I need to use the pdf viewer lib and do it all in my App. Seems like a boat-load of overhead.
 
Upvote 0
Top