Make document read-only in Android
<p>I use below code to open .doc file by call other application.<br>
But I don't want the file be modify.<br>
So I want to set file to read only.<br>
Or any other method to avoid user modify file.<br>
The file format may *.doc, *.docx, *.ppt, *.pptx, *.pdf, *.txt.</p>

<pre><code>File file = new File(FilePath);
String mimetype = ".doc\tapplication/msword";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), mimetype);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
</code></pre>
