I am building TV app that lets user pick a video from storage and returns its full path. Intent.ACTION_GET_CONTENT not working on Android TV. But works on phone. TV not supporting Storage Access Framework.
MY CODE is not working on Android TV. Let me know how to achieve this.
fileintent= new Intent(Intent.ACTION_GET_CONTENT);
fileintent.setType("video/*");
startActivityForResult(fileintent, 10 );
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10:
if (resultCode == RESULT_OK) {
videopath = data.getDataString();
Toast.makeText(MainActivity.this, videopath, Toast.LENGTH_LONG).show();
videov.setVideoURI(Uri.parse(videopath));
videov.seekTo(1);
// videov.start();
}
break;
}
}