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?