Hi guys,

I'm running a very simple example for Notification service. The
notification appears properly when I'm running the example in the
emulator, but when executed in a real system it displays the
contentTitle but not the contentText and timestamp. Any ideas?

////////
public void Send_notification(String mtickerText, String
mcontentTitle, String mcontentText)
{
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager)
getSystemService(ns);
int icon = R.drawable.icon;
CharSequence tickerText = mtickerText;
long when = System.currentTimeMillis();

Notification notification = new Notification(icon, tickerText, when);

Context context = getApplicationContext();
CharSequence contentTitle = mcontentTitle;
CharSequence contentText = mcontentText;
Intent notificationIntent = new Intent(getApplicationContext(),
DBActivity.class);

PendingIntent contentIntent =
PendingIntent.getActivity(getApplicationContext(), 0,
notificationIntent, 0);
notification.setLatestEventInfo(getApplicationContext(),
mcontentTitle, mcontentText, contentIntent);
mNotificationManager.notify(NOTIFY_ID, notification);

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to