In Ignition Vision, is there any way to access the directories of a mobile phone connected to the device on which Ignition is running?
I tried using the functions system.file.openFile and os.listdir, but I didn't get any results.
Whats the goal here?
It's probably possible, but the phone will definitly have to allow this, before its visible in the directory.
Though im pretty sure different phone brands/versions have different file structures, so it seems waaay to much work to locate something.
The goal would be to save the path of a file chosen by a user on their phone, and then perform all the actions that can be done with system.file (move it, delete it, etc...).
Will all the phones be of the same type (android)?
How owuld you let them select this folder?
Why do they need to go through igntion to move files?
While it seems to be possible, it also seems very dangerous to do this, are you gonna let igntion check if the user transfers malious files?
Are you gonna check if ignitions tries to delete critical files on the phone?
This seems dangerous and a lot of work just so a user doesnt have to open a fileexplorer.
Probably easier to just let them upload stuff from their phone to a cloud drive
Vision doesn’t run on phones…
I tried asking why and what he really wants, But could assume OP might want to plugin an usb to a phone and download some images (?)
Ah, if that’s the case, then yeah I guess if you mounted the phone as mass USB storage or whatever so it was just another drive it should be accessible?
Most devices do not support this for securety reasons.
They only support MTP (Media Transfer Protocol) and PTP (Picture Transfer Protocol) protocols. Which do not support the classic drive access UMS (USB mass storage) would give.
(unless in debug mode, with abd (android debug bridge) which is not what you want your users to be in)
Atleast it used to be like this... I havent worked on android apps in a while...
A quick google shows there might be some android apps that allow ums. But not sure how much that is safer or supported these days.
Linux typically exposes MTP in a private mount, so would be accessible as files. FWIW