Open email attachment with my app

  • Replies:0
Bartosz Bialecki
  • Forum posts: 1

Jan 23, 2013, 11:34:30 AM via Website

Hi everyone,

I would like to open email attachments with my app. I added that to my manifest file:

1<intent-filter>
2 <action android:name="android.intent.action.VIEW" />
3
4 <category android:name="android.intent.category.DEFAULT" />
5
6 <data
7 android:host="*"
8 android:mimeType="*/*"
9 android:pathPattern=".*.pdf" />
10</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:

1<uses-permission android:name="com.android.email.permission.READ_ATTACHMENT"/>
2<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?

Reply