Opening email attachments in Android
Posted
by zehrer
on Stack Overflow
See other posts from Stack Overflow
or by zehrer
Published on 2010-06-13T09:26:52Z
Indexed on
2010/06/13
9:32 UTC
Read the original article
Hit count: 986
android
I try to open a specific email attachment type with my activity, the attachment itself is a plain text windows style ini file with the extension *.os. In the email this file is attached as "application/octet-stream". I tried the following intent-filter to catch the attachment with my activity:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http" android:host="*" android:pathPattern=".*\\.os"/>
<data android:scheme="https" android:host="*" android:pathPattern=".*\\.os"/>
<data android:scheme="content" android:host="*" android:pathPattern=".*\\.os"/>
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.os"/>
</intent-filter>
The Email app is fetching the attachment but is then telling me "The attachment cannot be displayed". What can I do? How can I debug this?
© Stack Overflow or respective owner