filepath to internal storage

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
orthomaker
Posts: 14
Joined: Sat Feb 29, 2020 11:23 am

filepath to internal storage

Post by orthomaker » Mon Mar 02, 2020 6:46 am

Hello,

I have made a soft who parse user text.

I have try it on a Galaxy Tab E tablet , a Samsung J3 phone and android TV. It works well but, I have have some problem to know filepath to user internal storage.

I enter manually "/storage/emulated/0/Lecture". It's work well on Galaxy Tab E and Samsung J3.

First problem :
"/storage/emulated/0/Lecture" is the filepath for Teatcher User (Administrator)

it may be
"/storage/emulated/10/Lecture" for Student (Low level User)

1 - How can livecode know which User is running ?

With Android TV the internal filepath storage may contain "/Mémoire interne" but I don't know to complete filepath.

2 - How do I know the user internal storage path ? (specialfolderPath??)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8428
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: filepath to internal storage

Post by FourthWorld » Mon Mar 02, 2020 7:50 am

orthomaker wrote:
Mon Mar 02, 2020 6:46 am
1 - How can livecode know which User is running ?
Does Android now support a multi-user UI?
2 - How do I know the user internal storage path ? (specialfolderPath??)
Yep.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

orthomaker
Posts: 14
Joined: Sat Feb 29, 2020 11:23 am

Re: filepath to internal storage

Post by orthomaker » Mon Mar 02, 2020 9:24 am

I work with old Samsung Galaxy Tab E , running android 4.4 and we have 2 users profil (Teatcher and student)

orthomaker
Posts: 14
Joined: Sat Feb 29, 2020 11:23 am

Re: filepath to internal storage

Post by orthomaker » Mon Mar 02, 2020 1:01 pm

Is there a keyword for specialFolderPath that refer to user internal storage?
Engine and Documents doesn't work for this ...

orthomaker
Posts: 14
Joined: Sat Feb 29, 2020 11:23 am

Re: filepath to internal storage

Post by orthomaker » Mon Mar 02, 2020 3:54 pm

It's work now on a Android TV.
The filepath to user storage is "/mnt/sdcard/Lecture".

Is there a way to know the kind of Android Device where the app is running?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5847
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: filepath to internal storage

Post by jacque » Mon Mar 02, 2020 5:31 pm

The path to the shared file system is specialFolderPath("external documents"). All the other special folder paths are inside the app sandbox.

You might be able to get the user device by getting "the machine".

You will need to find out from the user whether they are a student or a teacher. This is often done by requiring a login, but that means that you must set up a server to recognize the login. Or you could ask the user on first launch and store their role on disk for later access, but that relies on students telling the truth. Or you could create two versions of the app, one for teachers and another for students.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

orthomaker
Posts: 14
Joined: Sat Feb 29, 2020 11:23 am

Re: filepath to internal storage

Post by orthomaker » Mon Mar 02, 2020 10:26 pm

That's work
Many thanks
:D :D :D

Post Reply

Return to “Android Deployment”