Intent resultIntent =
new
Intent();
resultIntent.putExtra(
"name"
, et.getText().toString());
Toast.makeText(getBaseContext(), u.toString(), Toast.LENGTH_LONG).show();
"uri"
, u.toString());
setResult(
1
, resultIntent);
finish();
String name = data.getExtras().getString(
);
String stringuri = data.getExtras().getString(
Toast.makeText(getBaseContext(),
"result name : "
+ name, Toast.LENGTH_LONG).show();
"uri : "
+ stringuri, Toast.LENGTH_LONG).show();
위가 보내는 쪽이구요. 여기까지는 Uri u 값이 잘 나옵니다.
아래는 받는 쪽인데요. name 값은 잘 나오는데... uri값이 null로 나오네요. ㅠ
2번 사용하면 안되나봅니다.. 그럼 값을 2개 보낼 때는 어떡하죠??
putEatra 로 여러개의 값을 넘길 수 있어요.
Bundle bundle = data.getExtras();
String name = null;
String uri = null;
if( bundle != null ) {
name = bundle.getString(...);
uri = bundle.getString(...);
}
위와 같은 방식으로 해보세요.