Android Video Player

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

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
burkec
Posts: 5
Joined: Fri Jun 22, 2018 3:48 pm

Android Video Player

Post by burkec » Thu Sep 20, 2018 11:00 am

Hi all,
I'm back again. I need to have a player on my App that I'm moving from Windows/Mac deployment. I know how to play a movie file "embedded" in the bundle. However, I need the user to be able to select a movie on their mobile device (testing on Samsung Galaxy 10) to play. I cannot see how to do this anywhere (please forgive me if I've missed it :o )!
I've attached a screen shot of the app. It's pretty simple. Basically, the user can select a movie to play and while it's playing they can press the buttons. These are coded and write to a text file. The user then copies the results text off their device.
Any help greatly appreciated.
Thanks,
Colin
Attachments
Screen Shot 2018-09-20 at 10.57.05.png

Klaus
Posts: 10425
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Android Video Player

Post by Klaus » Thu Sep 20, 2018 11:23 am

Hi Colin,

due to "sanboxing" there is no "answer file..." or something like that on the mobile platform!
And we cannot fake this somehow or "roll our won".

We can e.g. use "mobilepickmedia" and only access all the supported specialfolderpath() on Android.


Best

Klaus

burkec
Posts: 5
Joined: Fri Jun 22, 2018 3:48 pm

Re: Android Video Player

Post by burkec » Thu Sep 20, 2018 2:06 pm

Hi Klaus,
Thanks for responding to one of my queries (yet again :wink: ). I have to say that I'm really disappointed that this is not possible :(
I thought I could even try to see if it was possible to allow the users copy their movie clips to the specialpathfolder documents and resources, and they must use the same filename each time eg "testmovie.mp4". Then in my app can" put specialFolderPath("documents or resources") & "/testmovie.mp4" into VideoFile" and play it? This way they could copy the files one at at time and carry out the testing on the video and extract their txt file. Unfortunately this does not work either way (resources or documents) :(
Is there anything else you could suggest before I admit defeat? I developed the program years ago for PC/Mac (and it's used all over) and would hate to go back to the academic now with a no....AND we spent a grand on updating Livecode to do it :roll:
Cheers,
Colin

Klaus
Posts: 10425
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Android Video Player

Post by Klaus » Thu Sep 20, 2018 3:07 pm

Hi Colin,

sorry, I do not own any mobile device, no tablet or cell-phone, yes, that's me, so I don't know much about the "guts" of the Android file-system. However I doubt that your users can copy anything into the documents or resources folder inside of your app.

Hope others will chime in soon...


Best

Klaus

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

Re: Android Video Player

Post by jacque » Thu Sep 20, 2018 6:08 pm

I haven't tried this at all, so you're on your own, but I have a theoretical solution. There is a specialFolderPath("external documents") that accesses files outside the sandbox. You could use "the files" to get a list of available files from that location and display them in your app. When the user selects one, rebuild the file name using that specialFolderPath as the root location.

The downside is that files may be inside other folders and you'd basically need to write your own interface to display the file structure. But try it and see what you get. I've meant to explore this for a while but there's never enough time.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

strongbow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 119
Joined: Mon Jul 31, 2006 1:39 am
Location: New Zealand, Australia, Germany, Japan
Contact:

Re: Android Video Player

Post by strongbow » Fri Sep 21, 2018 6:06 am

Could you import the video from Dropbox?

If it was on iOS you could prob use mergAV (I think).

Post Reply

Return to “Android Deployment”