How do I turn off music when an app is minimized?

Get help using Construct 2

Post » Sat May 23, 2015 5:06 pm

I've built a program in Construct 2, exported to HTML 5, with Intel XDK built an android version. So while playing the game(BG music is playing), when I switch to a different app on my mobile, the music is still playing. (In properties the play in background option is set to "No"). What could be causing this?
B
6
S
1
Posts: 9
Reputation: 374

Post » Sun May 24, 2015 7:28 pm

There is a setting in the project properties "Pause on unfocus".
You should try to turn that on if it isn't.
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Mon May 25, 2015 12:48 pm

aquadijoib wrote:There is a setting in the project properties "Pause on unfocus".
You should try to turn that on if it isn't.


Thank you for your reply. No that didn't work. I noticed when i ran Debug Layout and switched tabs(Using Chrome) .
My music in "Currently playing" disappeared. Is that normal?
B
6
S
1
Posts: 9
Reputation: 374

Post » Mon May 25, 2015 12:58 pm

Does this work?
First add the browser object..

browser on suspended - stop music
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon May 25, 2015 1:31 pm

LittleStain wrote:Does this work?
First add the browser object..

browser on suspended - stop music


Thank you, this worked on browser, is there anything similar to stop music when switching to another app while my "game" is running? (I'm using Android 5.0)
B
6
S
1
Posts: 9
Reputation: 374

Post » Mon May 25, 2015 6:30 pm

stanka12 wrote:
LittleStain wrote:Does this work?
First add the browser object..

browser on suspended - stop music


Thank you, this worked on browser, is there anything similar to stop music when switching to another app while my "game" is running? (I'm using Android 5.0)


I thought the browser-object worked on Android as well, hmmmm...
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon May 25, 2015 8:53 pm

LittleStain wrote:
stanka12 wrote:
LittleStain wrote:Does this work?
First add the browser object..

browser on suspended - stop music


Thank you, this worked on browser, is there anything similar to stop music when switching to another app while my "game" is running? (I'm using Android 5.0)


I thought the browser-object worked on Android as well, hmmmm...


Could the problem be, that the app isn't uploaded?
B
6
S
1
Posts: 9
Reputation: 374

Post » Wed May 27, 2015 7:09 pm

Anyone?
B
6
S
1
Posts: 9
Reputation: 374

Post » Wed May 27, 2015 9:28 pm

On suspended --> Audio; Pause tag "NameTag"
Rememeber to use a Tag for your music (Audio -> Play -> AudioFile, Loop, Volume, TAG)
Play my games on www.pocketgames.es
B
13
S
3
Posts: 45
Reputation: 819

Post » Sun May 31, 2015 4:18 pm

GloryF90 wrote:On suspended --> Audio; Pause tag "NameTag"
Rememeber to use a Tag for your music (Audio -> Play -> AudioFile, Loop, Volume, TAG)


I tried that, when LittleStain suggested that. Still no progress... And how do i check if the user is already playing any music or something so that his and mine don't play at the same time?
B
6
S
1
Posts: 9
Reputation: 374

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 13 guests