Created
September 18, 2012 00:02
-
-
Save suminb/3740516 to your computer and use it in GitHub Desktop.
Playing notification sound in Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onResume() { | |
super.onResume(); | |
Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); | |
MediaPlayer mp = MediaPlayer.create(this, alert); | |
mp.start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment