use with putExtra to send the Uri Path:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent .setClass(ThisActivity.this, NewActivity.class);
intent .putExtra("KEY", Uri);
startActivity(intent );
In the newActivity OnCreate method:
Bundle extras = getIntent().getExtras();
if (extras != null && extras.containsKey("KEY")) {
Uri= extras.getString("KEY");
}
Use those func:
Uri to String:
Uri uri;
String stringUri;
stringUri = uri.toString();
String to Uri:
Uri uri;
String stringUri;
uri = Uri.parse(stringUri);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…