Use MediaSession instead of deprecated classes
This commit is contained in:
parent
0aedfe1293
commit
010e8f9664
3 changed files with 130 additions and 46 deletions
|
|
@ -12,7 +12,7 @@ import android.content.ComponentName;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v7.app.NotificationCompat;
|
||||
import android.view.View;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
|
|
@ -64,6 +64,7 @@ public class PlayingNotificationHelper {
|
|||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
||||
.setContent(notificationLayout)
|
||||
.setStyle(new NotificationCompat.MediaStyle())
|
||||
.build();
|
||||
notification.bigContentView = notificationLayoutExpanded;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue