In my application, I want to open all types of files using Intent. I tried to open files like .pdf, .text, .image, .gif, .mp3, .mp4, word file, .html.
Those are open correctly. But I don't know how to open .xml file .
it might work for you please try
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.xml" android:mimeType="*/*" />
</intent-filter>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.