[TIMOB-14152] Android: Sound resumes during the phone lock screen in Gingerbread devices
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-06-10T19:40:50.000+0000 |
| Affected Version/s | Release 3.1.0 |
| Fix Version/s | 2013 Sprint 12 Core, 2013 Sprint 12, Release 3.2.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Allen Yeung |
| Assignee | Allen Yeung |
| Created | 2013-06-07T18:10:31.000+0000 |
| Updated | 2014-06-19T12:43:24.000+0000 |
Description
Steps to reproduce:
1. Run the following code:
var win = Titanium.UI.createWindow({
title:'Audio Test',
backgroundColor:'#fff',
layout: 'vertical'
});
var audioPlayer = Ti.Media.createAudioPlayer({
url: 'cricket.wav',
allowBackground: false
});
audioPlayer.start();
win.open();
2. Hit the power button to lock the phone
3. Hit the power button to go to the unlock screen
Expected Result:
The sound should not resume until you actually unlock the screen
Actual Result:
Sound resumes as soon as you reach the unlock screen
Attachments
| File | Date | Size |
|---|---|---|
| cricket.wav | 2013-06-07T18:10:31.000+0000 | 80923 |
Another test case using sound instead of audio player:
The test steps are the same as the original ones mentioned.var win = Titanium.UI.createWindow({ title:'Audio Test', backgroundColor:'#fff', layout: 'vertical' }); var player = Ti.Media.createSound({url:"cricket.wav"}); player.play(); win.open();PR: https://github.com/appcelerator/titanium_mobile/pull/4366
Verified the fix. The sound stops when the phone is locked using the power button & again starts playing when we unlock the phone. Thus closing. Environment: Appcel Studio : 3.2.0.201310221639 Ti SDK : 3.2.0.v20131022050844 Mac OSX : 10.8.5 CLI - 3.2.0 with hash 72f7426b4ee6c2d2883c666d5b7e03906a16012f Device: Samsung Galaxy S4 running android 4.2.2 & Motorola droid running android 2.3.3