I wanted a custom extension file (* .xyz) to be opened through my application. Inside the application manifest file, I write the following:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http" android:host="*" android:pathPattern=".*\\.xyz" />
<data android:scheme="https" android:host="*" android:pathPattern=".*\\.xyz" />
<data android:scheme="content" android:host="*" android:pathPattern=".*\\.xyz" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.xyz" />
</intent-filter>
After that, I will install my application on the device and send an email containing Sample.xyzmail as an attachment. When I try to open the application in the mail client to open the attachment, it will throw an error with the name
No app can open this attachment for viewing
Even if you download the application and then try to open it, it will give an error
Can't open file
Can anyone suggest what might be wrong?
source
share