Display PDF in android device

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Display PDF in android device

Post by MaxV » Tue May 12, 2015 9:49 am

Please note that on Linux (and so on Android and Mac) there are symbolic links.
Linux ALWAYS mount in the /mnt directory. So /mnt/sdcard should always exists.
Go to /mnt and see what it contains, probably there are:
  • sdcard (virtual internal sdcard)
  • sdcard2 (real external sdcard)
  • extsdcard (real external sdcard, a link to sdcard2)


Your folder /storage/extSdCard/ probably is just a link to /mnt/extsdcard.
See:
http://en.wikipedia.org/wiki/Mount_%28Unix%29
http://en.wikipedia.org/wiki/Ln_%28Unix%29
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Display PDF in android device

Post by SparkOut » Tue May 12, 2015 5:02 pm

Yes, that's what I was driving at - I know from browsing around my devices there are several permutations of paths to storage, with a variety of symbolic links to the different places storage/sdcard0 versus /mnt/sdcard etc.
I was hoping for some definitive location across all android versions and devices...
Maybe a specialFolderPath("storage") would be possible?

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Display PDF in android device

Post by MaxV » Wed May 13, 2015 11:33 am

No, since there is no standard. :lol:
I suggest you to use /mnt/sdcard, it's always present, no matter if it's a link, an internal virtual memory, external memory, etc.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Display PDF in android device

Post by SparkOut » Mon May 18, 2015 6:38 pm

Well thanks, that was helpful. Delving into the folder structure without root, file managers still managed to give inconsistent paths and symbolic links, also changing whether the phone was connected to the computer or not. But even though it's not one of the paths consistently displayed by file managers, using /mnt/sdcard/ is working, so far solidly in all situations.
Big thanks

Post Reply