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

Android 13 devices error on share with Twitter or Facebook #1200

Open
juanmaldonadodev opened this issue Nov 29, 2022 · 6 comments · May be fixed by #1205
Open

Android 13 devices error on share with Twitter or Facebook #1200

juanmaldonadodev opened this issue Nov 29, 2022 · 6 comments · May be fixed by #1205

Comments

@juanmaldonadodev
Copy link

After add
<queries> <package android:name="com.facebook.katana" /> <package android:name="com.whatsapp" /> <package android:name="com.twitter.android" /> </queries>

The canShare let us share to Facebook, Whatsapp or Twitter.

But on share we have an exception for Facebook and Twitter

Fatal Exception: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.twitter.android/com.twitter.app.dm.DMActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>? at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2171) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805) at android.app.Activity.startActivityForResult(Activity.java:5583) at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:647) at android.app.Activity.startActivityForResult(Activity.java:5541) at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:628) at org.apache.cordova.CordovaInterfaceImpl.startActivityForResult(CordovaInterfaceImpl.java:69) at nl.xservices.plugins.SocialSharing$2$1.run(SocialSharing.java:348)

And For facebook:
Fatal Exception: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.facebook.katana/com.facebook.composer.shareintent.ImplicitShareIntentHandlerDefaultAlias}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>? at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2171) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805) at android.app.Activity.startActivityForResult(Activity.java:5583) at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:597) at org.apache.cordova.CordovaActivity.startActivityForResult(CordovaActivity.java:352) at android.app.Activity.startActivityForResult(Activity.java:5541) at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:583) at org.apache.cordova.CordovaInterfaceImpl.startActivityForResult(CordovaInterfaceImpl.java:69) at nl.xservices.plugins.SocialSharing$2$1.run(SocialSharing.java:348)

I have done some research and it seems a problem just in Android 13.

I have tested changing AndroidManifest.
https://developer.android.com/guide/components/intents-filters#ExampleFilters

But I have not been able to fix the problem

@sujen2009
Copy link

I am having same issue. Any work around?

@krishna711
Copy link

I too have same issue on Android 13 only. No work around found. I tried upgrading plugin to latest version 6.0.4.

@SiempreProgramadorNovato

In my end app was crashing when sharing on any platform. I solved putting this on config.xml

    <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/receiver[@android:name='nl.xservices.plugins.ShareChooserPendingIntent']">
        <activity android:exported="true" />
    </edit-config>

@angjelkom angjelkom linked a pull request Feb 21, 2023 that will close this issue
@Samuel-Oliveira
Copy link

Same Error Here.

@EYALIN
Copy link

EYALIN commented Apr 12, 2023

@Samuel-Oliveira @SiempreProgramadorNovato @krishna711 @sujen2009 @Juanico18
it has been fixed in my forked repo:
https://github.com/EYALIN/community-cordova-plugin-social-sharing

you can install it as an npm package:
cordova plugin add community-cordova-plugin-social-sharing --save

@Niagawan-mave
Copy link

The above plugin works !!!
Just remove the original cordova-plugin-x-social-sharing, then install the one above

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

Successfully merging a pull request may close this issue.

7 participants