In the application, the system activates to select pictures from the library, in the case when several pictures are selected, they can be extracted in the activit as follows

private void extractPickedImages(int requestCode, int resultCode, Intent data) { String realPath; try { // When an Image is picked if (requestCode == PICK_IMAGE_MULTIPLE_REQUEST_CODE && resultCode == Activity.RESULT_OK && null != data) { imagesPathList = new ArrayList<String>(); if (data.getData() != null) { if (Build.VERSION.SDK_INT < 11) realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(this, data.getData()); // SDK >= 11 && SDK < 19 else if (Build.VERSION.SDK_INT < 19) realPath = RealPathUtil.getRealPathFromURI_API11to18(this, data.getData()); // SDK > 19 (Android 4.4) else realPath = RealPathUtil.getRealPathFromURI_API19(this, data.getData()); saveImageOnDevice(Build.VERSION.SDK_INT, data.getData().getPath(), realPath); Log.e(TAG, "imageEncoded:" + realPath); } else { if (data.getClipData() != null) { ClipData mClipData = data.getClipData(); ArrayList<Uri> mArrayUri = new ArrayList<Uri>(); for (int i = 0; i < mClipData.getItemCount(); i++) { ClipData.Item item = mClipData.getItemAt(i); Uri uri = item.getUri(); if (Build.VERSION.SDK_INT < 11) realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(this, uri); // SDK >= 11 && SDK < 19 else if (Build.VERSION.SDK_INT < 19) realPath = RealPathUtil.getRealPathFromURI_API11to18(this, uri); // SDK > 19 (Android 4.4) else realPath = RealPathUtil.getRealPathFromURI_API19(this, uri); saveImageOnDevice(Build.VERSION.SDK_INT, uri.getPath(), realPath); Log.e(TAG, "imageEncoded:" + realPath); imagesPathList.add(realPath); } Log.v("LOG_TAG", "Selected Images" + mArrayUri.size()); } } } else { Toast.makeText(getApplicationContext(), "You haven't picked Image", Toast.LENGTH_LONG).show(); } } catch (Exception e) { Toast.makeText(getApplicationContext(), "Something went wrong", Toast.LENGTH_LONG) .show(); } } 

This code emphasizes the line:

 ClipData mClipData = data.getClipData(); 

and it is indicated that this method is available in API version 16, and in my project the minimum version of API 15, what can replace these strings to work on API 15?

    0