问题
I want to get pdf and convert it into base64. use this code to start picker
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
String [] mimeTypes = {"image/*", "application/pdf"};
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
startActivityForResult(intent, 1);
I had used below solution : https://stackoverflow.com/a/41440869/6864437
but it is not working on android pie
getting below error: Request header queries do not support projections, selections or sorting
How to get the Full file path from URI
回答1:
Solution used : I use input stream (suggested by @blackaaps) to get data from file and create new file which I can use to get full path.
来源:https://stackoverflow.com/questions/58544580/need-absolute-file-path-of-selected-file-using-intent-action-open-document-in-an