Skip to first unread message

MxyzptlkHavok

unread,
May 1, 2016, 8:41:51 PM5/1/16
to MIT App Inventor Forum
VALID STORAGE LOCATIONS:
____________________________________________________________________________________________________________



____________________________________________________________________________________________________________

Writable External Locations:




Must manually create directory with actual name of your app.

E.G. appinventor.ai_MxyzptlkHavok.fileTest





Final writable locations from testing results
--------------------------------------------------------
____________________________________________________________________________________________________________

CONCLUSION
____________________________________________________________________________________________________________

Need a way to MKDIR() or MKDIRS() [JAVA]

an activity starter perhaps [com.android.????]

end users who have to: 1. manually create directories, or, 2. rely on external apps, is inconvenient

if an app were able to be activityStarted with "appName", and in return, create only those directories; then, return those directory paths...


Notes: your paths may differ from mine, as well as your results...

           but in my opinion, an app can only write to its' own folder in one of these three locations:

           1. "android/data"
        2. "android/obb"
        3. "ext root"

____________________________________________________________________________________________________________




sidenote:

               Taifun, would it be possible to get your zip extension for testing?




Taifun

unread,
May 2, 2016, 12:04:17 PM5/2/16
to MIT App Inventor Forum
using my file extension, the directory should be created automatically in case it does not exist
that's interesting!

are you able to use the Copy block to copy a file to directory file:///storage/ext_sd/Android/obb/appinventor.ai_MxyzptlkHavok.fileTest/ on the external sdcard and at the same time creating that directory in case it does not exist? 

As you probably have seen, I'm not able to test this, because I do not have such device and for some the message "permission denied" occurred while copying to the external sdcard  

which device and Android version did you use for your tests?

btw. my zip extension is now available to download here https://puravidaapps.com/zip.php
Taifun


Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

MxyzptlkHavok

unread,
May 3, 2016, 6:54:13 AM5/3/16
to mitappinv...@googlegroups.com
TEST TRIAL 2
____________
____________

Test bed(s):

                   DEVICE 1
                   ---------------------------------------------------------------------------------------------
                   device: rooted HTC 510 desire
                   android version: 4.4.2
                   htc sense version: 6.0
                   htc sdk api level: 6.25
                   kernel version: 3.4.0
                                           shinru2004@shinru2004-MS-7693 #1
                                           SMP PREEMPT
                   baseband version: 1.101.1372.19.0725_10.22.4205.00L_F
                   build number: NonSense Beta 1.01

                   ext_sd: Samsung 128 EVO+ Micro SD XC I
                   notes on test bed: non-stock device setup, custom rom, custom kernal
                   ________________________________________________________

                   DEVICE 2
                   ----------------------------------------------------------------------------------------------
                   device: stock HTC 510 desire
                   android version: 4.4.2
                   htc sense version: 6.0
                   software number: 1.11.506.8
                   htc adk api level: 6.25
                   kernel version: 3.4.0-gb43dcd3
                                           and@AABM #1
                                           SMP PREEMPT
                  baseband version: 1.101.1372.19.0921_10.29.4205.00L_F
                  build number: 1.11.506.8 CL374695 release-keys

                  ext_sd: SanDisk Ultra Plus 16GB MicroSD HC I

               
________________________________________________________________________________________________

Test 1. directory present/not present test
------------------------------------------------------

file to copy: test.jpg

dir to create: appinventor.ai_MxyzptlkHavok.fileTest/

locations to create dir in: storage/ext_sd/Android/data/
                                        storage/ext_sd/Android/obb/
                                        storage/ext_sd/

Syntax used:

file:///storage/ext_sd/Android/data/appinventor.ai_MxyzptlkHavok.fileTest/test.jpg
file:///storage/ext_sd/Android/obb/appinventor.ai_MxyzptlkHavok.fileTest/test.jpg
file:///storage/ext_sd/appinventor.ai_MxyzptlkHavok.fileTest/test.jpg


results: 1. fails with ENOENT if appinventor.ai_MxyzptlkHavok.fileTest/ directory does not exist
             2. will not create dir, but will write to if present

________________________________________________________________________________________________

Test 2. new directory if directory present test
-----------------------------------------------------------

file to copy: test.jpg

new dir to make: newTest/

locations to write to: storage/ext_sd/Android/data/appinventor.ai_MxyzptlkHavok.fileTest/
                                 storage/ext_sd/Android/obb/appinventor.ai_MxyzptlkHavok.fileTest/
                                 storage/ext_sd/appinventor.ai_MxyzptlkHavok.fileTest/

syntax used:


results: will create newTest/ directory if appinventor.ai_MxyzptlkHavok.fileTest/ is present

________________________________________________________________________________________________

EACCES triggered if directory is not named in accordance to app (this is for trying to write to pre-existing directories).
________________________________________________________________________________________________

Conclusions: As previously reached in trial 1, an app can only write to its own directory but can't create its own directory
and inline directories will only be created if an app is writing to its own directory. However, this test is for writing to external
sd cards only, and should not be deemed conclusive for work on an internal structure.

Taifun

unread,
May 3, 2016, 3:12:16 PM5/3/16
to MIT App Inventor Forum
thank you very much for your tests!
Taifun

RAFAEL GONÇALVES

unread,
Aug 16, 2019, 3:25:15 AM8/16/19
to MIT App Inventor Forum
Boa noite, eu sou novo nesse sistema de app's 
desenvolvi um app no AppInventor no qual tem audios para ouvir e estou tentando colocar para compartilhalos tambem. 
Tipo quando a pessoa quiser compartilhar ela vai pressionar o botao do audio e ele vai dar a opçao de compartilhar para ela. 
fiz isso tudo certo, mas quando instalo o app e vou compartilhar aparece que "error 2001: the file could not be found on your device"
Ai me falaram que tenho que copiar os arquivos para o armazenamento para dps conseguir compartilha. mas n estou sabendo usar o Taifun, pode me ajudar? vou anexar oque estou fazendo para vcs analizarem.  
Sem título.png

BodyMindPower

unread,
Aug 16, 2019, 6:58:46 AM8/16/19
to MIT App Inventor Forum
open a new thread / topic for your question ...
(this thread was closed more than 3 years ago and a lot changed in  Android since then)
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages