Created
July 8, 2015 05:19
-
-
Save wasnot/60dbaa123726c6235e4c to your computer and use it in GitHub Desktop.
[Android][AppCompat]AppCompat22.2.0でv7.NotificationCompatが追加されてMediaStyleが使えるようになっていた ref: http://qiita.com/wasnot/items/1f687197f931c37cf496
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
new NotificationCompat.Builder(this).setStyle(new Notification.MediaStyle() | |
.setMediaSession(mySession)) |
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
Notification noti = new NotificationCompat.Builder() | |
.setSmallIcon(R.drawable.ic_stat_player) | |
.setContentTitle("Track title") | |
.setContentText("Artist - Album") | |
.setLargeIcon(albumArtBitmap)) | |
.setStyle(new NotificationCompat.MediaStyle() | |
.setMediaSession(mySession)) | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment