제가 뭔가 잘못한게 있는지..
내용의 값이 전부 null로 나오는데요 고수님들 소스 한번 확인 부탁드립니다.
@Override
public void onNotificationPosted(StatusBarNotification sbn) {
Log.i(TAG, "********** onNotificationPosted");
Log.i(TAG,
"ID :" + sbn.getId() + "\t" + sbn.getNotification().tickerText
+ "\t" + sbn.getPackageName());
if (sbn.getPackageName().toString().contains("com.sec.android.app.music")) {
Notification mNotification = sbn.getNotification();
Bundle extras = mNotification.extras;
String notificationTitle = extras
.getString(Notification.EXTRA_TITLE);
int notificationIcon = extras.getInt(Notification.EXTRA_SMALL_ICON);
Bitmap notificationLargeIcon = ((Bitmap) extras
.getParcelable(Notification.EXTRA_LARGE_ICON));
CharSequence notificationText = extras
.getCharSequence(Notification.EXTRA_TEXT);
CharSequence notificationSubText = extras
.getCharSequence(Notification.EXTRA_SUB_TEXT);
Log.i("secmusic", "title : " + notificationTitle);
Log.i("secmusic", "Icon : " + notificationIcon);
Log.i("secmusic", "LargeIcon : " + notificationLargeIcon);
Log.i("secmusic", "text : " + notificationText);
Log.i("secmusic", "subtext : " + notificationSubText);
}
.........................................................
}