'Importing' a data file into a Mobile app
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: 'Importing' a data file into a Mobile app
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...
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...
Last edited by Traxgeek on Sat Sep 27, 2014 3:54 pm, edited 1 time in total.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1
Re: 'Importing' a data file into a Mobile app
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
put "mnt/sdcard/Movies/doggy.mp4" into docpath
But maybe this is more about the number of sd cards you have.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: 'Importing' a data file into a Mobile app
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
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
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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: 'Importing' a data file into a Mobile app
Great !
Have to test some (simple) things out.
Thanks Simon !
Have to test some (simple) things out.
Thanks Simon !
Re: 'Importing' a data file into a Mobile app
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
and socket for android are avalibel with the plugin of Mr. Hao: http://hedgehao.blogspot.it/2015/04/hao ... ecode.html
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: 'Importing' a data file into a Mobile app
Thanks MaxV !
Re: 'Importing' a data file into a Mobile app
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).
/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
i will check when i have time 

Re: 'Importing' a data file into a Mobile app
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
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: 'Importing' a data file into a Mobile app
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.
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.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: 'Importing' a data file into a Mobile app
Thanks Max!
Now... is it possible to tell from LC whether the user's device is set to allow/prefer external storage?
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
Max, is your device rooted? I get nothing when querying either the files or the folders in mnt/sdcard.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: 'Importing' a data file into a Mobile app
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.
On my Android phone the path to the external SD card is:
/storage/sdcard1
/storage/sdcard0
is the path to the internal flash memory.