@@ -1427,6 +1427,12 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable Intent d
14271427 if (resultCode == Activity .RESULT_OK ) {
14281428 assert data != null ;
14291429 ArrayList <Uri > imagePaths = new ArrayList <>(Objects .requireNonNull (data .<Uri >getParcelableArrayListExtra (FilePickerConst .KEY_SELECTED_MEDIA )));
1430+ if (imagePaths .size () > 2 ) {
1431+ if (mInterstitialAd .isLoaded ()) {
1432+ mInterstitialAd .show ();
1433+ }
1434+ }
1435+
14301436 for (Uri uri : imagePaths ) {
14311437 String filePath = FileUtils .getFilePath (requireContext (), uri );
14321438 notes .add (new FileItem (FileUtils .copyFile (filePath , noteFolder .getPath ())));
@@ -1463,6 +1469,13 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable Intent d
14631469 assert data != null ;
14641470 if (null != data .getClipData ()) {
14651471 Log .d (TAG , "onActivityResult: document count = " + data .getClipData ().getItemCount ());
1472+
1473+ if (data .getClipData ().getItemCount () > 2 ) {
1474+ if (mInterstitialAd .isLoaded ()) {
1475+ mInterstitialAd .show ();
1476+ }
1477+ }
1478+
14661479 for (int i = 0 ; i < data .getClipData ().getItemCount (); i ++) {
14671480 Uri uri = data .getClipData ().getItemAt (i ).getUri ();
14681481 String filePath = FileUtils .getFilePath (requireContext (), uri );
@@ -1494,6 +1507,13 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable Intent d
14941507 if (resultCode == Activity .RESULT_OK ) {
14951508 assert data != null ;
14961509 ArrayList <Uri > videoPaths = new ArrayList <>(Objects .requireNonNull (data .<Uri >getParcelableArrayListExtra (FilePickerConst .KEY_SELECTED_MEDIA )));
1510+
1511+ if (videoPaths .size () > 2 ) {
1512+ if (mInterstitialAd .isLoaded ()) {
1513+ mInterstitialAd .show ();
1514+ }
1515+ }
1516+
14971517 for (Uri uri : videoPaths ) {
14981518 String filePath = FileUtils .getFilePath (requireContext (), uri );
14991519 notes .add (new FileItem (FileUtils .copyFile (filePath , noteFolder .getPath ())));
@@ -1515,6 +1535,14 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable Intent d
15151535 assert data != null ;
15161536 if (null != data .getClipData ()) {
15171537 Log .d (TAG , "onActivityResult: audio count = " + data .getClipData ().getItemCount ());
1538+
1539+ if (data .getClipData ().getItemCount () > 2 ) {
1540+ if (mInterstitialAd .isLoaded ()) {
1541+ mInterstitialAd .show ();
1542+ }
1543+ }
1544+
1545+
15181546 for (int i = 0 ; i < data .getClipData ().getItemCount (); i ++) {
15191547 Uri uri = data .getClipData ().getItemAt (i ).getUri ();
15201548 String filePath = FileUtils .getFilePath (requireContext (), uri );
0 commit comments