- Home /
How to resolve Samsung App Store submission failure
My game got rejected from the Samsung App Store because the audio continues to play when the phone is turned off, and user returns to the lock screen. However, on my Note3 I don't experience this issue. Perhaps this only happens on certain Samsung phones.
Below is the result that Samsung sent me. Any ideas how to fix this?......
Defect Sound occurs on Lock-screen after Hold mode is on/off.
Procedure 1. Execute the application 2. Launch a level of the game 3. Leave as it is till the Lock-screen is applied 4. Try to be on/off Hold mode 5. Check whether the sound occurs or not
Expected Result The sound should not occur on Lock-screen after Hold mode is on/off.
$$anonymous$$aybe check this setting
http://docs.unity3d.com/ScriptReference/Application-runInBackground.html
Answer by Kurius · Dec 20, 2014 at 08:49 PM
Just add the following method to your game. Note you can test this by running your game, then hold the power button on your device for a few seconds until the usual Android OS prompt appears. You will notice at this point that your game will automatically pause and the sound will mute. Then when you escape out of that Android OS prompt on your screen, your game will automatically unpause and the sound will resume.
void OnApplicationFocus(bool focusStatus) {
if(focusStatus == true){
Time.timeScale = 1;
}else{
Time.timeScale = 0;
}
}
Your answer
Follow this Question
Related Questions
what are audio or sound extensions accepted in unity ? 1 Answer
How can I stop animation and sound clip looping on tapCount 1 Answer
3D Audio Source plays choppy/poping in web player (Video) 1 Answer
Logarithmic Rolloff Sounds Plays After Max Distance 0 Answers
multiple sounds, sound....sucky 0 Answers