Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android - Stop sound when lock

$
0
0

I'm developing a game using Titanium. On iOS, there is no problem.

I play a sound in Alloy.js :

Alloy.Globals.ambiance  = Ti.Media.createSound({url:"/pages/sounds/ambiance.mp3",looping:true,volume:0.8});
Alloy.Globals.ambiance.play();
On android, when phone is locked, sound continues to play. Is there a way to avoid this ?

Thank you.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>