I am working on fetching images from gallery and i want to store the image selected in a integer. I have tried everything but nothing is helping me, my code is
private void getGalleyImage() {
Intent fileChooserIntent = new Intent();
fileChooserIntent.addCategory(Intent.CATEGORY_OPENABLE);
fileChooserIntent.setType("image/*");
fileChooserIntent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(
Intent.createChooser(fileChooserIntent, "Select Picture"), 1);
}
i am getting images but i am not able to store that image in integer, i have tried uri and bitmap then bytearray, I want to store them in integer. thanks in advance.