


Use below method to browse documents where REQUEST_CODE_DOC is requestCode for onActivityResult(final int requestCode, final int resultCode,final Intent data) method. To support or browse these extensions you need to add more mimeTypes. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. In any language, make sure to check for null on specific Strings and initializations.Asamadi's way is OK, but need to add something for appropriate use.įor Microsoft documents both (.doc or. Below is the code for the MainActivity.java file. Go to the MainActivity.java file and refer to the following code. When we run the above program in the android studio we will get the. Step 3: Working with the MainActivity.java file. Set the MIME type to RawContacts.CONTENTTYPE. data - the type of data the activity can send.

It is important to note that if you are going to use this code, you check to make sure that the user has the package "" installed on their device. Create an intent To start, create a new Intent object with the action. Ví d, thông qua startActivity() bn có th xác nh mt Intent s dng gi chy mt Activity khác. This file contains a Relative Layout which contains three Edit texts for receiver mail id, another for the subject of the mail, and last one for the body of the email, and three TextViews for the label and a button for starting intent or sending mail: XML
