Jump to content


Photo
- - - - -

Open email attachment with my app

android attachment intent-filter

  • Please log in to reply
No replies to this topic

#1 bialek

bialek

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 23 January 2013 - 02:32 AM

Hi everyone,

I would like to open email attachments with my app. I added that to my manifest file:
<intent-filter>
		    <action android:name="android.intent.action.VIEW" />
		    <category android:name="android.intent.category.DEFAULT" />
		    <data
			    android:host="*"
			    android:mimeType="*/*"
			    android:pathPattern=".*.pdf" />
</intent-filter>

but when I click the attachment to open it from the email app I got permission denial error while starting intent. I tried also add to the manifest that:
<uses-permission android:name="com.android.email.permission.READ_ATTACHMENT"/>
<uses-permission android:name="com.android.email.permission.ACCESS_PROVIDER"/>

but it didn't help either. I tested on the android 2.3.3 and 4.1.2. Is there something I forgot?





Also tagged with one or more of these keywords: android, attachment, intent-filter