Can you try:
public static void sendNotification(Context context, String info){
NotificationCompat.Builder notifyBuilder = new NotificationCompat.Builder(context);
//title notifications
notifyBuilder.setContentTitle(context.getString(R.string.app_name));
//small icon
notifyBuilder.setSmallIcon(R.drawable.ic_launcher);
//set contentText
notifyBuilder.setContentText(info);
notifyBuilder.setVibrate(new long[]{100, 200, 100, 500}); notifyBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
//setAutoCancel
notifyBuilder.setAutoCancel(true);
getNotificationManager(context).notify(0, notifyBuilder.build());
}
public final static NotificationManager getNotificationManager(Context context) {
return (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
}
And when you used a new Intent(), please insert a destination class
Intent wrapperIntent = new Intent(context, SenderBroadcast.class);
wrapperIntent.putExtra("KEY_UID", uid);
wrapperIntent.setData(Uri.parse("senderbroadcast://"+uid));
wrapperIntent.setAction("REQUESTCODE_SENDERBROADCAST");
PendingIntent.getActivity(context, RequestCode.REQUESTCODE_SENDERBROADCAST, wrapperIntent, PendingIntent.FLAG_UPDATE_CURRENT);