Notification service put extra on notification click, how?

view story

http://stackoverflow.com – Well I have a service that runs with a notification, I want to put an extra with the new intent opened when the user clicks the notification, so when MainActivity opens I can get the extra. I have tried with different ways, but I just don't find how to get it to work. Here's what I have tried: This is MyService Intent intent = new Intent(MyService.this, MainActivity.class); intent.putExtra("EXTRA", StringTEST); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent contentIntent = PendingInt (HowTos)