Switched from NotificationBuilder to NotificationCompatBuilder

This commit is contained in:
daniel 2012-06-05 21:23:55 +02:00
parent 4dba7a3ec5
commit bd15b03c64

View File

@ -10,6 +10,7 @@ import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.MediaPlayer;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import android.net.Uri;
import android.os.Binder;
@ -33,7 +34,7 @@ public class PlaybackService extends Service {
"action.de.podfetcher.service.playerStatusChanged";
private static final int NOTIFICATION_ID = 1;
private Notification.Builder notificationBuilder;
private NotificationCompat.Builder notificationBuilder;
private Notification notification;
private MediaPlayer player;
@ -105,7 +106,7 @@ public class PlaybackService extends Service {
this, 0, new Intent(this, MediaplayerActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
Bitmap icon = BitmapFactory.decodeResource(null, R.drawable.stat_notify_sdcard);
notificationBuilder = new Notification.Builder(this)
notificationBuilder = new NotificationCompat.Builder(this)
.setContentTitle("Mediaplayer Service")
.setContentInfo("Click here for more info")
.setOngoing(true)