Up vote 1 down vote favorite share g+ share fb share tw.
I tried to send push notifications ( vogella.de/articles/AndroidCloudToDevice... ) Everything seemed fine.. but I have a problem to pass the payload to the notification after the first run. This is my code: public void createNotification(Context context, String payload) { NotificationManager notificationManager = (NotificationManager) context . GetSystemService(Context.
NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable. Icon, "Received message", System. CurrentTimeMillis()); // Hide the notification after its selected notification.
Flags |= Notification. FLAG_AUTO_CANCEL; Intent intent = new Intent(context, MessageReceivedActivity. Class); intent.
PutExtra("payload", payload); Log. D("C2DM", "OK.. TRUE MESSAGE --->: payload = " + payload); PendingIntent pendingIntent = PendingIntent. GetActivity(context, 0, intent, 0); notification.
SetLatestEventInfo(context, "news", "news...", pendingIntent); notificationManager. Notify(0, notification); } ..and after, when I read the notification: public class MessageReceivedActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout. Activity_result); super.
OnCreate(savedInstanceState); } @Override protected void onStart() { super.onStart(); Bundle extras = getIntent().getExtras(); if (extras! = null) { String message = extras. GetString("payload"); Log.
D("C2DM", "ERROR: ALWAYS FIRST MESSAGE! --> " + message); if (message! = null && message.length() > 0) { TextView view = (TextView) findViewById(R.id.
Result); view. SetText(message); } } } the message that I sent to the second activity does not update ever! --- S O L V E D ---- I changed this row: PendingIntent pendingIntent = PendingIntent.
GetActivity(context, 0,intent, PendingIntent. FLAG_CANCEL_CURRENT); android notifications message android-c2dm notificationmanager link|improve this question edited 2 hours ago asked 11 hours agoLuca Zap194 83% accept rate.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.