Skip to first unread message

Ivo Allinoro

unread,
Nov 13, 2015, 6:18:15 AM11/13/15
to MIT App Inventor Forum
Hello , I need to know if someone have solved this problem .
My phone is THL W200 and use Android KitKat 4.4.2 , it have 8GB of external memory .
I try to create a app with App Inventor 2 for recognize picture and song of birds .
For sound there are not problem because the element (PLAYER) have a property (SOURCE) and if I put () it is ok.
But for Image or Canvas all is different .
The path is correct because if placed in the (Player)(source) it is ok
I copied in the /mnt/sdcard/ the file (Image01.jpg) I tried :
files://mnt/sdcard/Image01.jpg
//mnt/sdcard/Image01.jpg
Nothing
The same thing if I can use the external SDCARD

Thanks at All

 

Taifun

unread,
Nov 13, 2015, 12:07:38 PM11/13/15
to MIT App Inventor Forum
the correct path to the image would be file:///mnt/sdcard/Image01.jpg or just Image01.jpg
note: it is file and not files and there are 3 slashes, also names are case sensitive...

and: you only can access the default drive, see also https://groups.google.com/d/msg/mitappinventortest/WKL-arLP6Yk/NKUVKUSblKgJ
Taifun

SteveJG

unread,
Nov 13, 2015, 12:22:46 PM11/13/15
to MIT App Inventor Forum
Taifun mentioned "can access the default drive,"  ..that means, at least on Samsung devices, you cannot access the external SDcard with App Inventor.  What you use on Samsung is what is sometimes called the emulated SD and is the internal memory.

One day, AI2 might have the capability of directly accessing the external SD card using an improved File component that can access folders; that is not possible now.

Regards,
Steve   

Ivo Allinoro

unread,
Nov 16, 2015, 3:30:16 AM11/16/15
to MIT App Inventor Forum
Thanks a lot but :
Taifun :
I tried all strategy of access ( with 2 slashes or 3 slashes ) with image in the Phone memory or external memory ( Physical Memory not virtual ) but App Inventor don't show me the Image .
SteveJG :
I don't think the problem is the access permission to SD because i can read mp3 file inside the phone memory or on external memory .
Maybe is a problem of IMAGE FUNCTION in App Inventor 2 or someone can show me or share a example where i can see  images withdrawn to external memory .

Thanks for attention

Scott Ferguson

unread,
Nov 16, 2015, 7:58:42 AM11/16/15
to MIT App Inventor Forum
You may not want to use the sdcard for your pictures as each user of the app will not be able to access the pictures unless your app has a way to save them on their device.
I would put the pictures in the Media folder instead.
However, to answer your question,

If you placed Image01.jpg directly in the sdcard folder you access it this way: "/Image01.jpg"
If you keep all of your images in a subfolder under 'sdcard' named 'images' then you would use: "/images/Image01.jpg" 
If you place it in the app's Media folder you would use: "Image01.jpg"
---
sf

Taifun

unread,
Nov 16, 2015, 9:18:48 AM11/16/15
to MIT App Inventor Forum
as SteveJG already said and also mentioned here, both the canvas and file component can't access external sd cards https://groups.google.com/forum/#!msg/mitappinventortest/WKL-arLP6Yk/NKUVKUSblKgJ
Taifun

Ivo Allinoro

unread,
Nov 16, 2015, 10:03:48 AM11/16/15
to MIT App Inventor Forum
Thank you all for your patience.
I'm not happy but for now I arrange so !

Reply all
Reply to author
Forward
0 new messages