Enable hardware volume control buttons in DroidGap applications

This commit is contained in:
macdonst 2011-02-02 23:27:58 +08:00
parent f220489543
commit 3c9089b9c7

View File

@ -16,6 +16,7 @@ import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Picture;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
@ -179,6 +180,8 @@ public class DroidGap extends PhonegapActivity {
this.init();
}
}
// Setup the hardware volume controls to handle volume control
setVolumeControlStream(AudioManager.STREAM_MUSIC);
}
/**