title: "Bad notification for startForeground" error when using android-upload-service
body: <p>I don't know why I'm getting this error because I haven't actually used any notifications channels in my app and I don't intend to do.
  Can somebody help me fix this?</p>
  
  <p>Error:</p>
  
  <pre><code>2019-12-10 16:58:03.151 9542-9542/com.example.demoproject E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.demoproject, PID: 9542
      android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: null
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1894)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:214)
          at android.app.ActivityThread.main(ActivityThread.java:7156)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
  </code></pre>
  
  <p>Activity:</p>
  
  <pre><code>public class File_upload extends AppCompatActivity {
  
      Button SelectButton, UploadButton;
      EditText PdfNameEditText ;
  
      Uri uri;
      String username;
      public static final String PDF_UPLOAD_HTTP_URL = "https://depcollproj.000webhostapp.com/FileUpload.php";
  
      public int PDF_REQ_CODE = 1;
  
      String PdfNameHolder, PdfPathHolder, PdfID;
  
      @Override
      public void onBackPressed() {
          Log.d("CDA", "onBackPressed Called");
          Intent setIntent = new Intent(getApplicationContext(),TeacherView.class);
          setIntent.putExtra("username",username);
          startActivity(setIntent);
          finish();
      }
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_file_upload);
          AllowRunTimePermission();
          Intent i=getIntent();
          username=i.getStringExtra("username");
          SelectButton = (Button) findViewById(R.id.button);
          UploadButton = (Button) findViewById(R.id.button2);
          PdfNameEditText = (EditText) findViewById(R.id.editText);
  
          SelectButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  // PDF selection code start from here .
                  Intent intent = new Intent();
                  intent.setType("application/pdf");
                  intent.setAction(Intent.ACTION_GET_CONTENT);
                  startActivityForResult(Intent.createChooser(intent, "Select Pdf"), PDF_REQ_CODE);
              }
          });
  
          UploadButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                      PdfUploadFunction();
              }
          });
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          if (requestCode == PDF_REQ_CODE &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null &amp;&amp; data.getData() != null) {
              uri = data.getData();
              SelectButton.setText("PDF is Selected");
          }
      }
  
      public void PdfUploadFunction() {
          PdfNameHolder = PdfNameEditText.getText().toString().trim();
          PdfPathHolder = FilePath.getPath(this, uri);
          if (PdfPathHolder == null) {
              Toast.makeText(this, "Please move your PDF file to internal storage &amp; try again.", Toast.LENGTH_LONG).show();
          } else {
              try {
                  PdfID = UUID.randomUUID().toString();
  
                  new MultipartUploadRequest(this, PdfID, PDF_UPLOAD_HTTP_URL)
                          .addFileToUpload(PdfPathHolder, "pdf")
                          .addParameter("name", PdfNameHolder)
                          //.addParameter("username",username)
                          .setNotificationConfig(new UploadNotificationConfig())
                          .setMaxRetries(5)
                          .startUpload();
                  Toast.makeText(this, " Upload Successful ", Toast.LENGTH_SHORT).show();
                  Log.d("Upload Procedure", "PdfUploadFunction:  -------"+PdfNameHolder+username);
              }
              catch (Exception exception) {
                  Log.d("Upload Procedure", "PdfUploadFunction: Fail");
                  Toast.makeText(this, exception.getMessage(), Toast.LENGTH_SHORT).show();
              }
          }
      }
  
  
      public void AllowRunTimePermission(){
          if (ActivityCompat.shouldShowRequestPermissionRationale(File_upload.this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
              Toast.makeText(File_upload.this,"READ_EXTERNAL_STORAGE permission Access Dialog", Toast.LENGTH_LONG).show();
          } else {
              ActivityCompat.requestPermissions(File_upload.this,new String[]{ Manifest.permission.READ_EXTERNAL_STORAGE}, 1);
          }
      }
  
      @Override
      public void onRequestPermissionsResult(int RC, String per[], int[] Result) {
          switch (RC) {
              case 1:
                  if (Result.length &gt; 0 &amp;&amp; Result[0] == PackageManager.PERMISSION_GRANTED) {
                      Toast.makeText(File_upload.this,"Permission Granted", Toast.LENGTH_LONG).show();
                  } else {
                      Toast.makeText(File_upload.this,"Permission Canceled", Toast.LENGTH_LONG).show();
                  }
                  break;
          }
      }
  }
  </code></pre>