Closed chris087 closed 1 year ago
This is the fix: (in MainActivity.java)
package com.ip.infraphoto;
import com.getcapacitor.BridgeActivity;
import android.os.Bundle;
public class MainActivity extends BridgeActivity {
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.clear(); }
}
This is the fix: (in MainActivity.java)
package com.ip.infraphoto;
import com.getcapacitor.BridgeActivity;
import android.os.Bundle;
public class MainActivity extends BridgeActivity {
@OverRide public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.clear(); }
}
Thank you Chris! This fix worked for me!
I tried to add this fix to the plugin but was not able to. So I added the fix to the README. If you know a way to do this in the plugin instead plz let me know.
Android:
When sharing screen appears: Share to ex Whatsapp, it opens whatsapp, after getting back to app it restarts ( crash)
ionic 6, latest Capacitor
-- Update:
I use Base64 Data. with a small PDF file it seems to work OK. < 50 kb. But larger get these error:
Shutting down VM 2022-10-17 15:20:19.868 13960-13960/com.ip.infraphoto E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ip.infraphoto, PID: 13960 java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1639160 bytes at android.app.ActivityClient.activityStopped(ActivityClient.java:86) at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:143) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8663) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) Caused by: android.os.TransactionTooLargeException: data parcel size 1639160 bytes at android.os.BinderProxy.transactNative(Native Method) at android.os.BinderProxy.transact(BinderProxy.java:635) at android.app.IActivityClientController$Stub$Proxy.activityStopped(IActivityClientController.java:1358) at android.app.ActivityClient.activityStopped(ActivityClient.java:83) at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:143) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8663) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) 2022-10-17 15:20:19.905 13960-13960/com.ip.infraphoto I/Process: Sending signal. PID: 13960 SIG: 9 2022-10-17 15:20:28.797 15769-15769/? I/m.ip.infraphot: Late-enabling -Xcheck:jni 2022-10-17 15:20:28.973 15769-15769/? E/USNET: USNET: appName: com.ip.infraphoto 2022-10-17 15:20:28.976 15769-15769/? D/ProcessState: Binder ioctl to enable oneway sp