title: NotificationCompat v7 not working on Oreo and later OS version
body: <p>I am having troubles with <code>NotificationCompat v7</code> on <code>android 8,9</code> . 
  whats the best way to show notification on all android version</p>
  
  <p><strong>debug log</strong> </p>
  
  <pre><code>android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=0 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE)
  </code></pre>
  
  <p>MinSDK=18, TargetSDK=28, Android Gradle Plugin Version=3.4.1, gradle version=5.1.1 </p>
  
  <p>how to solve this issue any good solution for this ??</p>
  
  <p><strong>My gradle file</strong></p>
  
  <pre><code>dependencies {
      implementation "com.android.support:support-core-utils:28.0.0"
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha5'
      testImplementation 'junit:junit:4.13-beta-2'
     'com.android.support.test:runner:1.0.2'
      implementation "com.android.support:support-core-utils:28.0.0"
      implementation 'com.google.code.gson:gson:2.8.5'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.android.support:support-compat:28.0.0'
  }
  
  
  
  
  
   @Override
          public void onCreate() {
              super.onCreate();
              wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
              hotspotControl = HotspotControl.getInstance(getApplicationContext());
              m_notificationStopActionReceiver = new BroadcastReceiver() {
                  @Override
                  public void onReceive(Context context, Intent intent) {
                      if (null != intent &amp;&amp; WIFI_AP_ACTION_STOP.equals(intent.getAction()))
                          disableHotspotAndStop();
                  }
              };
              registerReceiver(m_notificationStopActionReceiver, new IntentFilter(WIFI_AP_ACTION_STOP));
              //Start a foreground with message saying 'Initiating Hotspot'. Message is later updated using SHARE_SERVICE_NOTIFICATION_ID
              startForeground(SHARE_SERVICE_NOTIFICATION_ID, getNotification(getString(R.string.p2p_sender_service_init_notification_header), false));
              hotspotCheckHandler = new HotspotChecker(this);
          }
  
          protected android.support.v4.app.NotificationCompat.Action getStopAction() {
              Intent intent = new Intent(WIFI_AP_ACTION_STOP);
              PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
              return new android.support.v4.app.NotificationCompat.Action.Builder(android.R.drawable.ic_menu_close_clear_cancel, "Stop", pendingIntent).build();
          }
  </code></pre>