NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_launcher) // notification icon
.setContentTitle("اس ام اس باز") // title for notification
.setContentText("پیامک جدید از : ") // message for notification
.setAutoCancel(true); // clear notification after click
Intent smsintent = new Intent(context, MainActivity.class);
PendingIntent pi = PendingIntent.getActivity(context,0,smsintent,Inte nt.FLAG_ACTIVITY_NEW_TASK);
mBuilder.setContentIntent(pi);
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERV ICE);
mNotificationManager.notify(0, mBuilder.build());
context ها رو دستکاری کردم چون تو کلاس رسیور بود این.