title: Open file from notification
body: <p>I download a file from a server. For this action I'm showing a notification with indeterminate progress. When the file will be downloaded I want to open it with a click on the notification.</p>
  
  <p>I get the extension and try to open it with <code>intent</code> like this</p>
  
  <pre><code>public static Intent openFile(Context context, File file) {
      String fileName = file.getName();
  
      String extension = fileName.substring(fileName.lastIndexOf(".") + 1);
  
  
      String type = "application/" + extension;
  
      if (getAttachmentType(fileName) == AttachmentType.IMAGE) {
          type = "image/*";
      } else if (getAttachmentType(fileName) == AttachmentType.AUDIO) {
          type = "audio/*";
      } else if (getAttachmentType(fileName) == AttachmentType.VIDEO) {
          type = "video/*";
      } else if (getAttachmentType(fileName) == AttachmentType.WORD) {
          type = "application/msword";
      } else if (getAttachmentType(fileName) == AttachmentType.EXCEL) {
          type = "application/vnd.ms-excel";
      } else if (getAttachmentType(fileName) == AttachmentType.POWERPOINT) {
          type = "application/vnd.ms-powerpoint";
      } else if (getAttachmentType(fileName) == AttachmentType.TXT) {
          type = "text/*";
      }
  
      Uri path = Uri.fromFile(file);
      Intent intent = new Intent(Intent.ACTION_VIEW);
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      Intent chooser = Intent.createChooser(intent, context.getResources().getString(R.string.open_file_with));
      intent.setDataAndType(path, type);
      return chooser;
  }
  </code></pre>
  
  <p>And on the notification do this</p>
  
  <pre><code>Intent intent = ActionsHelper.openFile(context, file);
  if (intent != null) {
       PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
        mBuilder.setContentIntent(pendingIntent);
  }
  </code></pre>
  
  <p>My problem is that with any extension the message on the chooser is <strong>No app can perform this action</strong>. Am I missing something?</p>