title: Android NotificationManager not alerting user
body: <p>I have the same issue as this person: <a href="https://stackoverflow.com/questions/50486017/notificationmanager-error-android-studio">NotificationManager Error Android Studio</a></p>
  
  <p>However I already have the solution implemented a while ago but this just stopped working.  I am at build API 28 on a P10 with Oreo 8.0.0 installed.  My code executes the notification logic, but I get this error:</p>
  
  <pre><code>E/NotificationManager: notifyAsUser: tag=null, id=-1522221101, user=UserHandle{0}
  </code></pre>
  
  <p>and even though the icon for the notification pops up in the phone's notification bar, and tapping it opens my intent, the user gets no notification that this message arrived.  I tried with the app in the foreground and in the background - both cases the small icon appears in the notification bar on top of the phone's UI, but no sound and no message.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Intent intent = new Intent(getContext(), AuthRequestActivity.class);
  intent.putExtra(getContext().getPackageName().concat(".param0"), code);
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  PendingIntent pendingIntent = PendingIntent.getActivity(getContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
  
  if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
    NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
    NotificationChannel channel = new NotificationChannel("default", "My Channel", NotificationManager.IMPORTANCE_DEFAULT);
    channel.setDescription("ALP Push Notifications");
    notificationManager.createNotificationChannel(channel);
  }
  
  Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
  NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getContext(), "default").setSmallIcon(R.drawable.app_icon)
      .setContentTitle("Authentication Request").setContentText(code)
      .setAutoCancel(true).setSound(defaultSoundUri)
      .setContentIntent(pendingIntent);
  
  NotificationManagerCompat notificationManager = NotificationManagerCompat.from(getContext());
  // Below alternative makes no difference
  //    NotificationManager notificationManager = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
  
  notificationManager.notify((int) System.currentTimeMillis(), notificationBuilder.build());
  </code></pre>
  
  <p>What am I doing wrong?</p>