I want my application to be on the list to open pdfs from anywhere in the android environment. I've looked around and added these intents based on what I've read. However when testing and opening a pdf it just opens it using the default application polaris?
It is my understanding that in the activity I use the code below to get the information passed in.
Intent intent = getIntent();
String action = intent.getAction();
String type = intent.getType();
I tried disbaling Polaris and then when opening it says unable to find application to perform this application.
<activity
android:name=".UserLogIn"
android:label="User Authentication" >
<intent-filter>
<action android:name="com.example.USERLOGIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:host="*" />
<data android:pathPattern=".*\\.pdf" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:host="*" />
<data android:mimeType="application/pdf" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.pdf" />
</intent-filter>
</activity>
This works for mine: