Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I share only jpg, jpeg and png images into the app? Android. #191

Open
UlanNurmatov opened this issue Nov 9, 2021 · 1 comment

Comments

@UlanNurmatov
Copy link

I want to share only jpg, jpeg and png images into the app, only on Android. What should I put in Manifest file?

@GastonRafaelCaliva
Copy link

GastonRafaelCaliva commented Aug 8, 2024

To make your application appear only when sharing jpg, jpeg and png, you have to add the following in android/app/src/main/AndroidManifest.xml

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/jpeg" />
    <data android:mimeType="image/jpg" />
    <data android:mimeType="image/png" />
</intent-filter>
<intent-filter>
    <action android:name="android.intent.action.SEND_MULTIPLE" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/jpeg" />
    <data android:mimeType="image/jpg" />
    <data android:mimeType="image/png" />
</intent-filter>

If you already had something set in your intent-filter such as <data android:mimeType="*/*" />, you should remove it

I have just sent a pr to update the README.md with this new indication #317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants