Issue
Here i shared the my code. Can anyone help?
var intent = Intent()
intent.type = "image/*"
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true)
intent.action = Intent.ACTION_GET_CONTENT
startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_MULTIPLE
Solution
Doesn't look like it's possible when using an intent. Even if we could set that option in the intent, the application which the user chooses will have to support it, which simply cannot be guaranteed. The easy way to ensure this behaviour will be to use an image picker library which can enforce this behaviour - Fishbun for example can do this:
FishBun.with(WithActivityActivity.this)
.setImageAdapter(new GlideAdapter())
.setMaxCount(5)
.setMinCount(3)
.startAlbum();
Detailed usage instructions can be found in its README file.
Disclaimer : I'm in no way associated with this library. I suggested it because it looks like its been updated recently and is quite popular.
Answered By - Neeraj
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.