Last updated:
0 purchases
open as default adv
open_as_default_adv #
A flutter plugin that allows setting up your flutter app to open files as default.
Currently working only on Android, iOS Support coming soon.
Usage #
yaml file
dependencies:
flutter:
sdk: flutter
open_as_default_adv: ^<Version> #add line
copied to clipboard
dart file
//import plugin
import 'package:open_as_default_adv/open_as_default_adv.dart';
...
@override
void initState() {
super.initState();
OpenAsDefault.getFileIntent.then((value) {
print(value);
// code
});
}
copied to clipboard
Android
android/app/src/main/manifest.xml
<application
..
>
<activity
...
>
<!-- addd line -->
<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.APP_BROWSER" />
<data
android:mimeType="application/pdf"
android:scheme="content" />
</intent-filter>
</activity>
</application>
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.