@@ -42,7 +42,7 @@ public static void TakePicture( Context context, NativeCameraMediaReceiver media
4242 final Fragment request = new NativeCameraPictureFragment ( mediaReceiver );
4343 request .setArguments ( bundle );
4444
45- ( (Activity ) context ).getFragmentManager ().beginTransaction ().add ( 0 , request ).commit ();
45+ ( (Activity ) context ).getFragmentManager ().beginTransaction ().add ( 0 , request ).commitAllowingStateLoss ();
4646 }
4747
4848 public static void RecordVideo ( Context context , NativeCameraMediaReceiver mediaReceiver , int defaultCamera , int quality , int maxDuration , long maxSize )
@@ -60,7 +60,7 @@ public static void RecordVideo( Context context, NativeCameraMediaReceiver media
6060 final Fragment request = new NativeCameraVideoFragment ( mediaReceiver );
6161 request .setArguments ( bundle );
6262
63- ( (Activity ) context ).getFragmentManager ().beginTransaction ().add ( 0 , request ).commit ();
63+ ( (Activity ) context ).getFragmentManager ().beginTransaction ().add ( 0 , request ).commitAllowingStateLoss ();
6464 }
6565
6666 // Credit: https://stackoverflow.com/a/35456817/2373034
@@ -121,7 +121,7 @@ public static void RequestPermission( Context context, final NativeCameraPermiss
121121 final Fragment request = new NativeCameraPermissionFragment ( permissionReceiver );
122122 request .setArguments ( bundle );
123123
124- ( (Activity ) context ).getFragmentManager ().beginTransaction ().add ( 0 , request ).commit ();
124+ ( (Activity ) context ).getFragmentManager ().beginTransaction ().add ( 0 , request ).commitAllowingStateLoss ();
125125 }
126126
127127 public static String LoadImageAtPath ( Context context , String path , final String temporaryFilePath , final int maxSize )
0 commit comments