Finally I made it it working now thanks a lot all
@Override
public void onReceive(Context context, Intent intent) {
Intent notificationIntent = new Intent(context, MainActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
Notification noti = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_launcher)
.setTicker("ticker")
//.setLargeIcon(largeIcon)
//.setWhen(System.currentTimeMillis()+1000)
.setContentTitle("title")
.setContentText("message!")
.setContentIntent(contentIntent)
//At most three action buttons can be added
.setAutoCancel(true).build();
int notifyID =0;
notificationManager.notify(notifyID, noti);
}