How do you depict the contents of the msg file?



  • There's a .msg file in the asset folder. How do you put his contents on the activity?



  • I'm opening this way:

    Intent intent = new Intent();
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.setAction(Intent.ACTION_VIEW);
    String type = "application/msword";
    intent.setDataAndType(Uri.fromFile(new File(path)), type);
        try {
           startActivity(intent);
        } catch (ActivityNotFoundException e) {
           showShortMessage(getString(R.string.need_doc_reader)); 
        }
    

    But of course, the MS office should be on the motto to work.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2