if (Settings.Secure.getInt(context.getContentResolver(),
Settings.Secure.DEVICE_PROVISIONED, 0) == 1 &&
Telephony.Sms.Intents.SIM_FULL_ACTION.equals(intent.getAction())) {
NotificationManager nm = (NotificationManager)
context.getSystemService(Context.NOTIFICATION_SERVICE);
Intent viewSimIntent = new Intent(context, ManageSimMessages.class);
viewSimIntent.setAction(Intent.ACTION_VIEW);
viewSimIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pendingIntent = PendingIntent.getActivity(
context, 0, viewSimIntent, 0);
Notification notification = new Notification();
notification.icon = R.drawable.stat_sys_no_sim;
notification.tickerText = context.getString(R.string.sim_full_title);
notification.defaults = Notification.DEFAULT_ALL;
notification.setLatestEventInfo(
context, context.getString(R.string.sim_full_title),
context.getString(R.string.sim_full_body),
pendingIntent);
nm.notify(ManageSimMessages.SIM_FULL_NOTIFICATION_ID, notification);
}