0

I want to share an image from the phone gallery. My app should be in sharing options. How can I do that in Xamarin Forms. Give me suggestion to resolve this issue

P.Thiyagu
  • 917
  • 2
  • 7
  • 15

1 Answers1

0

in Android ,add the following code in Manifest.xml

<intent-filter . . . >
    <data android:mimeType="video/mpeg" android:scheme="http"  /> 
    <data android:mimeType="audio/mpeg" android:scheme="http"  />
    //. . . add all mimetype which your app support here
</intent-filter>

in iOS

Add the following code in Info.plist .

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.item</string>
                <string>public.content</string>
            </array>
        </dict>
    </array>

For more type you can check System-Declared Uniform Type Identifiers.

Community
  • 1
  • 1
Lucas Zhang
  • 18,630
  • 3
  • 12
  • 22