这是我的代码:
MyNM = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
int icon = R.drawable.ic_launcher;
String tickerText = "Hello";
Notification notification = new Notification(icon, tickerText, System.currentTimeMillis());
String contentTitle = GetString(R.id.title);
MyI = new Intent(getApplicationContext(), LyceumWebNotification.class);
MyPI = PendingIntent.getActivity(getApplicationContext(), 0, MyI, 0);
notification.setLatestEventInfo(getApplicationContext(), "Hello" , "Title: " + contentTitle, MyPI);
MyNM.notify(NOTIFICATION_ID, notification);
public String GetString(int id){
return ((TextView)this.findViewById(id)).getText().toString();
}
可以获取TextView的数据并显示为通知的Charsequence吗?