1
I’m building an App in which I want it to allow, through a button, I choose images from the gallery and include and save inside the application. But I have a problem IMAGE_GALLERY_REQUEST
because Netbeans says it can’t find the symbol. I’m kind of a layman on the subject so I ask you to be as clear as possible in your reply. Thank you.
public void onImageGalleryClicked(View v) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
String pictureDirectoryPath = pictureDirectory.getPath();
Uri data = Uri.parse(pictureDirectoryPath);
photoPickerIntent.setDataAndType(data, "image/*");
starActivityForResult(photoPickerIntent, IMAGE_GALLERY_REQUEST);
}