I am putting together an App in which I want it to allow, through a button, that I choose images from the gallery and include and save within the application. But I have a problem with IMAGE_GALLERY_REQUEST
because NetBeans says it can not find the symbol. I'm kind of lazy on the subject so I ask you to be as clear as possible in the answer. 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);
}