Open phihungnv opened 11 months ago
I'm facing the same issue. Does anyone have any suggestions to fix it? :(.
@phihungnv @andrerds it looks like you don't have any email app installed maybe
Hi,
I was able to make the app work, but I haven't been able to test it on different versions of Android yet.
Here is a possible solution, which is not definitive, but it stopped the app from crashing for me.
On line 167, I added a check:
if(fileUris.isEmpty()){ return; }
As I said, it is not a definitive solution, but it stopped the app from crashing on Android 12.
I will continue testing the app on different versions of Android to see if I can find a more definitive solution.
file fix in : SocialSharing.java
Solved this fixing the issues in this pr:
https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/pull/1206/files
tested in android 13
@acosme and @andrerds the solutions below not fixed in my app.
still crush on android 12
@Dan890 @andrerds @acosme @phihungnv creo que he resuelto el problema, Solo agregue en el Androidanifest.xml lo siguiente
<queries>
<package android:name="com.google.android.gm" />
<package android:name="com.microsoft.office.outlook" />
</queries>
Esto nos permita que la aplicacion nos deje elegir entre el app de gmail o la de outlook, en caso de que se requiera que aparezca otra aplicación de correo, se necesitara agregar tambien el nombre del paquete que se requiera
14403-14484/com.xxx E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1 Process: com.xxx, PID: 14403 java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1 at java.util.ArrayList.remove(ArrayList.java:506) at nl.xservices.plugins.SocialSharing$1.run(SocialSharing.java:199) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012)