carsten-klaffke / send-intent

Repository for send-intent Capacitor plugin
MIT License
106 stars 12 forks source link

My Capacitor app does not show up in the "Open With" list of GMAIL #87

Open mvermand22 opened 7 months ago

mvermand22 commented 7 months ago

Describe the bug I created a basic Capacitor app and added the "de.mindlib.sendIntent.SendIntentActivity" Activity:

        <activity
            android:name="de.mindlib.sendIntent.SendIntentActivity"
            android:label="My Uploader"
            android:exported="true"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="*/*" />
            </intent-filter>
        </activity>

I can select this app as share target in many apps such as YouTube and Google Photo's, but the app is not listed in the "Open With" list if I click on an attachment in Gmail. This is exacly my use case, so I really need that.

To Reproduce Steps to reproduce the behavior:

  1. Install a demo app with this plugin
  2. Open GMail
  3. Select a mail with an attachment
  4. Click on the attachment
  5. A list with share targets appears, but the Capacitor app is not listed.

Expected behavior My app should show up in the "Open With" list of GMail when clicking on an attachment.

Smartphone (please complete the following information):

carsten-klaffke commented 7 months ago

- Is that possible with this plugin? With the sample AndroidManifest-configuration that I describe in the readme, an app wouldn't be shown in the "open with" dialogue. Nevertheless, it is possible with a slightly different configuration. - If so, am I doing something wrong? Add the following lines to your intent-filter (in this example for type PDF):

<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT"/>
<data android:scheme="content" />
<data android:mimeType="application/pdf" />

- Is there a demo app on the Play Store to test (so I can exclude failures/misconfigurations in my own app?) There is no demo on the play store, but the repository contains an example which you can build and execute.