<pre><activity android:name=".FileLauncherActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.OPENABLE" /> <data android:pathPattern=".*\\.pdf" /> <data android:pathPattern=".*\\..*\\.pdf" /> <data android:pathPattern=".*\\..*\\..*\\.pdf" /> <data android:pathPattern=".*\\..*\\..*\\..*\\.pdf" /> <data android:host="*" android:mimeType="*/*" android:scheme="file" /> </intent-filter> </activity>
filePath = Objects.requireNonNull(getIntent().getData()).getEncodedPath();
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="application/pdf" /> </intent-filter>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)