Skip to content

Commit

Permalink
[android] fixed cocos2d#405: pause BMG music when tap HOME and resume…
Browse files Browse the repository at this point in the history
… it when it is active
  • Loading branch information
minggo committed Mar 18, 2011
1 parent 757d471 commit a6e5a0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test.android/src/org/cocos2dx/lib/Cocos2dxActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ protected void onResume() {
if (accelerometerEnabled) {
accelerometer.enable();
}

// resume background music
resumeBackgroundMusic();
}

@Override
Expand All @@ -161,6 +164,9 @@ protected void onPause() {
if (accelerometerEnabled) {
accelerometer.disable();
}

// pause background music
pauseBackgroundMusic();
}

protected void setPackgeName(String packageName) {
Expand Down

0 comments on commit a6e5a0a

Please sign in to comment.