I think Firebase Storage
component uses absolute file path.
It works with the absolute file path! Thanks @vknow360 and @Taifun
…but only with a permission
And this problems seems to be unsolved until now:
READ_ / WRITE_EXTERNAL_STORAGE permissions / app-Specific (Private) External Storage
You are not using private storage for your file and thereby you need permission…
Later I tested it with using private storage (see link from my last post) and it needed the permission too
Or do you know any other solution to need no permission for this problem?
Thanks, but unfortunately that didn’t solve the problem.
The aks for permission comes again, by clicking on the “B_Upload”-Button. I don’t know if I did something wrong.
But I think…
…like explained here:
Try one of these extensions to create the ASD:
instead of using the File component (which requires WRITE permission, even for an ASD):
… and you may not need to create the ASD, because the EFile extension will probably do it automatically (by .SaveFile text
).
Did you mean this way:
I tested it with the other extension too and without creating ASD, as you suggested in your last post, but still I need the permission
Strangely the following blocks works without any problems (and need no permission to READ the text from the txt-file):
Try this:
instead of:
and remove the Package_Utilities
comp.
Actually Kodular does this for you already
Since I’m unfamiliar with Firebase Storage, now the question is if Firebase Storage component and blocks such this, may trigger permission and for upload, if it is full, relative path or not???
Yes, the ASD is now always created by Kodular (don’t know how long this has been so).
But AI2 doesn’t create it.
No, see here:
The problem arises from the EFile extension (EFile.ReadFrom
), which requests READ permission (even when reading from ASD): @vknow360
}else{
if (!hasReadAccess) {
new Handler().post(new Runnable() {
@Override
public void run() {
form.askPermission(Manifest.permission.READ_EXTERNAL_STORAGE,
new PermissionResultHandler() {
@Override
public void HandlePermissionResponse(String permission, boolean granted) {
hasReadAccess = granted;
}
});
}
});
}
So @vknow360 has to fix that (→ read from ASD without READ permission).
Note: The file test.txt is created in the ASD without WRITE permission.
Not necessary.
Since extension is open source so anyone can modify it.
I shall check it after Hackathon.
Of course, you’re right. But very few are likely to be able to adapt this so that READ permission is no longer requested when reading from an ASD.
I built a test app yesterday and it did not ask for permission but without Firebase Storage component
Then show your blocks.
See post 13
That saves file to private storage directoy in Internal Storage and not to asd in External Storage.
De/reinstall the app and try again.
The file is saved to the root dir of the external storage:
/storage/emulated/0/testPrivate.txt
No, see above.
EFile_test.apk (5.0 MB)
Did you check it again? I’m pretty sure that
- the file is neither stored in the ASD nor in private storage
- READ / WRITE permissions are requested.