Created
June 13, 2014 06:51
-
-
Save mchelen/7274e02252fe29c2c313 to your computer and use it in GitHub Desktop.
antennapod notification buttons
This file contains hidden or 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
Intent playButtonIntent = new Intent( | |
PlaybackService.this, PlaybackService.class); | |
playButtonIntent.putExtra( | |
MediaButtonReceiver.EXTRA_KEYCODE, | |
KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE); | |
PendingIntent playButtonPendingIntent = PendingIntent | |
.getService(PlaybackService.this, 0, | |
playButtonIntent, | |
PendingIntent.FLAG_UPDATE_CURRENT); | |
Intent stopButtonIntent = new Intent( | |
PlaybackService.this, PlaybackService.class); | |
stopButtonIntent.putExtra( | |
MediaButtonReceiver.EXTRA_KEYCODE, | |
KeyEvent.KEYCODE_MEDIA_STOP); | |
PendingIntent stopButtonPendingIntent = PendingIntent | |
.getService(PlaybackService.this, 0, | |
stopButtonIntent, | |
PendingIntent.FLAG_UPDATE_CURRENT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment