i have remote service in which when particular time comes, i show a notification. in notification i add extra value (ex. k=0) and pass it to proper activity. so first time activity receives correct value ( k=0). but when next time comes again in remoteservice i reset k=1 and add this extra value in notification. but this time activity receives only previous value (k=0) only not new value(k=1). Could some body see my code and correct me if i am wrong. Code in remote service.....
Notification notification = new Notification(R.drawable.tablet, text,System.currentTimeMillis()); Intent intent = new Intent(RemoteService.this, SnoozeActivity.class); intent.putExtra("k",c); PendingIntent contentIntent = PendingIntent.getActivity(this, 0,intent, 0); notification.setLatestEventInfo(this, getText(R.string.remote_service_label),text, contentIntent); myNM.notify(0, notification); Code in receiver...
Bundle extras = getIntent().getExtras(); if(extras !=null){ int v = extras.getInt("k"); Log.w("SnoozeActivity","k value : "+v); } is it possible to reset putExtra value in intent...if so how to do it?