I have an intent that can be used to allow the user to select some images in an image app like galley(or any other present in the user's device).
I want the user to select ONLY 10 images but i don't know how i can set this maximum on the intent. i have tried to see if i can use ClipData but clipdata doesn't have methods to set maximum number of items.
ClipboardManager manager = getSystemService(Context.CLIPBOARD_SERVICE)
ClipData clipdata = manager.getPrimaryClip();// in short whether i get
or i create a clipdata, there are no methods to set maximum number of
items to be held into that clip
here is my intent.
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, SELECT_PHOTO);
How can i limit the user to select only 10 photos?