I try to save a route but when reading the NFC card with the route, it does not play the video.
String content = et.getText().toString();
message = nfcMger.createUriMessage(content, "file");
if (message != null) {
dialog = new ProgressDialog(Video.this);
dialog.show();;
}
public void videosave(View view) {
myFileIntent = new Intent(Intent.ACTION_GET_CONTENT);
myFileIntent.setType("video/*");
startActivityForResult(myFileIntent, 10);
}
enter image description here
enter image description here
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 10 && resultCode == RESULT_OK && null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };
Cursor cursor = getContentResolver().query(selectedImage,filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String picturePath = cursor.getString(columnIndex);
cursor.close();
txt_pathShow.setText(picturePath);
}
}
question from:
https://stackoverflow.com/questions/65835169/how-to-save-video-path-in-nfc-tag 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…