bhagat-techind / flutter_sharing_intent

A flutter plugin to share file from other app to our app.
Apache License 2.0
49 stars 50 forks source link

[Android] Allow choosing which mime types to support #3

Open adil192 opened 1 year ago

adil192 commented 1 year ago

In my app Saber, I'd like it to be able to open json files and no other files. Linking https://github.com/adil192/saber/issues/196

<!-- Support opening json (.sbn) files -->
<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="application/json" />
</intent-filter>

but this plugin currently allows all mime types to be opened.

I propose something like https://pub.dev/packages/receive_sharing_intent#android for Android setup instructions (although ideally just the AndroidManifest.xml part and not the other bits)

Thanks for your work!

adil192 commented 1 year ago

Tried out this plugin and it just prints out handleIntent ==>> null for json files

bhagat-techind commented 1 year ago

Thanks @adil192 for using this plugin. We will take a look and will fix it soon.