hi, im trying to create a function that selects a photo from a phone gallery.
but when i use this code
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, 1);
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK)
{
Uri chosenImageUri = data.getData();
Bitmap mBitmap = null;
mBitmap = Media.getBitmap(this.getContentResolver(), chosenImageUri);
}
}```
the `RESULT_OK` and `this.getContentResolver()` terms are lit up red and the computer says he doesnt know them. what is wrong here?
this is on a fragment