Need to shut down Android player -- PLEASE!

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Need to shut down Android player -- PLEASE!

Post by DR White » Mon Dec 28, 2015 10:11 am

I have been banging my head all day yesterday trying several commands to shut down an media player, that has already been playing a mp3 file on an Android phone, so that when I my stack runs and start a player within LC, their are two players running that sound quit annoying. The commands that I have tried are:

play "stop"
play empty
mobileControlDelete sPlayerId
mobileControlDelete "Player"

Its like, if the the Android player is initiated from the phone itself there is no way that LC can shut it down. Tell me its not true!

Thanks,

David

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Need to shut down Android player -- PLEASE!

Post by bn » Mon Dec 28, 2015 1:16 pm

Hi David,

have a look at mobileControlDo in the dictionary

from the dictionary:
mobileControlDo
.....
Player Specific Actions
• play - Start playing the content of the player.
• pause - Pause the content at the current position.
• stop - Stop playing the content of the player.
looks like stop should work.

Kind regards
Bernd

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Need to shut down Android player -- PLEASE!

Post by DR White » Mon Dec 28, 2015 2:51 pm

Bernd,

Thanks for your effort, but "mobileControlDo" did not work.
I think one of the problems is that since the player is started automatically when the browser sees a mp3 file it uses the Android native player and I don't know the player name. Unfortunately, when the browser is closed the player keeps playing.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Need to shut down Android player -- PLEASE!

Post by jacque » Mon Dec 28, 2015 5:24 pm

Is the browser a native control your app created or one installed on the device separately? Do you control the content? I'm not clear on what behavior you're seeing. Can you describe the recipe?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Need to shut down Android player -- PLEASE!

Post by DR White » Mon Dec 28, 2015 8:50 pm

Jacquue,


The browser is one that was created with LC 7.1. The player that I cannot shutdown, seems to be one that automatically appears when the LC browser senses a mp3 file (I am guessing).

Short version:

My app creates a Android player, launches a browser and goes to a website with mp3 files listed.
The user touches the file they wish hear the Samsung Tab 3 screen goes black and a very small object that has a very small "Play"/"Pause" button appears in the middle of a black screen.
The mp3 file plays without touching the small object in the center of the screen (which is the way I want).
There is a "Done" button at the bottom of the screen, that the the user touches, shuts down the LC created player and everything is fine!
BUT, if the user touches the very small object that has a very small "Play"/"Pause" button in the middle of the black screen, then there are two audios that are played and no way of shutting down the one that was started with the very small "Play"/"Pause" button.

Thanks,

David

Post Reply