Delphi 12 Android not found Class MediaStore.
Where is MediaStore?
What is the reason for the absence of ‘Androidapi.Nin.MediaStore’ and is there an alternative solution?
////////////////////
try
ColumnIndex := Cursor.getColumnIndex(JMediaStore.MediaColumns.DATA);
if ColumnIndex >= 0 then
begin
Cursor.moveToFirst;
filePath := JStringToString(Cursor.getString(ColumnIndex));
// 在这里处理获取到的图片路径 filePath
ShowMessage(‘Selected Image Path: ‘ + filePath);
end;
finally
Cursor.close;
end;
///////////////////
JMediaStore encountered an error.
Wang Hua is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.