Is there any possible way to open a .doc extension file?
Here is a method to take care of this for you:
public void openDocument(String name) {
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
File file = new File(name);
String extension = android.webkit.MimeTypeMap.getFileExtensionFromUrl(Uri.fromFile(file).toString());
String mimetype = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
if (extension.equalsIgnoreCase("") || mimetype == null) {
// if there is no extension or there is no definite mimetype, still try to open the file
intent.setDataAndType(Uri.fromFile(file), "text/*");
} else {
intent.setDataAndType(Uri.fromFile(file), mimetype);
}
// custom message for the intent
startActivity(Intent.createChooser(intent, "Choose an Application:"));
}