Page 2 of 3

Re: 'Importing' a data file into a Mobile app

Posted: Wed Sep 17, 2014 10:14 pm
by Traxgeek
Thanks all.

I'll go take a look at a DropBox-esque approach !

For me I simply wanted to be able to locate a file on the External / Removal (SDCard) drives (Android). This would suffice... I'm still playing with all of this though - in all its guises...

Thanks a million - really appreciated...

Re: 'Importing' a data file into a Mobile app

Posted: Wed Sep 17, 2014 11:01 pm
by Simon
You know I did a video app ages ago and I just used the path I knew.
put "mnt/sdcard/Movies/doggy.mp4" into docpath
But maybe this is more about the number of sd cards you have.

Simon

Re: 'Importing' a data file into a Mobile app

Posted: Sun Jun 07, 2015 10:51 am
by sphere
Great info in here. I want to access files outside the snadbox too. And i'll try to use the last trick like Simon did. (allready have dropbox experience which really works great) But for some audio files i hope this works.

Re: 'Importing' a data file into a Mobile app

Posted: Mon Jun 08, 2015 4:53 pm
by Simon
Hi sphere,
with more info since this post it looks like this is a common path
"mnt/sdcard/"
even with devices that show the sdcard as something else e.g. ext_sdcard.

Simon

Re: 'Importing' a data file into a Mobile app

Posted: Mon Jun 08, 2015 5:19 pm
by sphere
Great !

Have to test some (simple) things out.

Thanks Simon !

Re: 'Importing' a data file into a Mobile app

Posted: Tue Jun 09, 2015 1:11 pm
by MaxV
I would suggest you to use socket approach. Here a lesson: http://lessons.runrev.com/m/4071/l/1292 ... ng-sockets

and socket for android are avalibel with the plugin of Mr. Hao: http://hedgehao.blogspot.it/2015/04/hao ... ecode.html

Re: 'Importing' a data file into a Mobile app

Posted: Sun Jun 14, 2015 5:30 pm
by sphere
Thanks MaxV !

Re: 'Importing' a data file into a Mobile app

Posted: Sun Jun 14, 2015 10:44 pm
by SparkOut
Just to go back to the original attempt - does the path /mnt/ext_sdcard show you anything on your device?

/mnt/ext_sdcard is a visible folder on my device, but empty. Whereas /mnt/sdcard is a symbolic link to storage/sdcard0 and /mnt/sdcard2 is a symbolic link to storage/sdcard1 (go figure).

Re: 'Importing' a data file into a Mobile app

Posted: Tue Jun 16, 2015 11:52 am
by sphere
i will check when i have time :)

Re: 'Importing' a data file into a Mobile app

Posted: Tue Jun 16, 2015 11:10 pm
by SparkOut
Just to be clear, I can't offer any advice. My questions are to try and understand how the storage works on different devices and look for some consistency.

Re: 'Importing' a data file into a Mobile app

Posted: Tue Jun 16, 2015 11:40 pm
by jacque
I don't get anything on either of the sd card paths. I believe you need to be on a rooted device to read those. My file manager can't see the files in there either.

Re: 'Importing' a data file into a Mobile app

Posted: Wed Jun 17, 2015 9:51 am
by MaxV
The standard location of SD card on Android is: /mnt/sdcard
If you have more than one sdcard you have also: /mnt/sdcard2, /mnt/sdcard3, etc.
Now phones have always a sdcard soldered inside that is /mnt/sdcard and the external is /mnt/sdcard2.
These folder are, usually, always present; you don't have to guess if they are soft-links or real folders, they always work.

Re: 'Importing' a data file into a Mobile app

Posted: Wed Jun 17, 2015 1:57 pm
by SparkOut
Thanks Max!

Now... is it possible to tell from LC whether the user's device is set to allow/prefer external storage?

Re: 'Importing' a data file into a Mobile app

Posted: Wed Jun 17, 2015 5:23 pm
by jacque
Max, is your device rooted? I get nothing when querying either the files or the folders in mnt/sdcard.

Re: 'Importing' a data file into a Mobile app

Posted: Thu Jun 18, 2015 3:28 am
by kurt
Don't know if the following is of any help.

On my Android phone the path to the external SD card is:
/storage/sdcard1

/storage/sdcard0
is the path to the internal flash memory.