How i can get Uri from intent?
<p>I did</p>

<pre><code>@Override
public void onClick(View v) {
    switch (v.getId()){
        //если выбрали камеру - запускаем ее
        case R.id.b_camera:
            //uri = generateFileUri();
            if (uri == null) {
                Toast.makeText(getView().getContext(), getResources().getString(R.string.sdnot), Toast.LENGTH_LONG).show();
                return;
            }
            Intent intentCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
            intentCamera.putExtra(MediaStore.EXTRA_OUTPUT, uri);
            //intentCamera.putExtra("return-data", true);
            startActivityForResult(intentCamera, PHOTO_INTENT_REQUEST_CODE);
        break;
    }
}
</code></pre>

<p>Method generateFileUri() is called in onCreateView().
Line intentCamera.putExtra("return-data", true); doesnot work for me (if use "return-data" as a key in onActivityResult at getParceble()).</p>

<pre><code>@Override
public void onActivityResult(int requestCode, int resultCode, Intent imageReturned) {

    switch (requestCode) {

        //если результат пришел от камеры
        case PHOTO_INTENT_REQUEST_CODE:
            if (resultCode == getActivity().RESULT_OK) {
                Log.i("HHHHHHHHHHHH", "result ok");
                //извлекаем uri фотки из интента
                Uri selectedImage = imageReturned.getData();
                Log.i("HHHHHHHHHHHH", "getdata works!");
                //создаем интент для запуска новой активити
                Intent last_intent_photo = new Intent(getView().getContext(), ViewPhoto.class);
                //помещаем в интент этот uri
                last_intent_photo.putExtra("fotka",selectedImage);
                //стартуем новую активити
                startActivity(last_intent_photo);

            } else if (resultCode == getActivity().RESULT_CANCELED)
                Toast.makeText(getView().getContext(), "Capture cancelled", Toast.LENGTH_LONG).show();
            else
                Toast.makeText(getView().getContext(), "Capture failed", Toast.LENGTH_LONG).show();
                break;
        default: super.onActivityResult(requestCode, resultCode, imageReturned);

    }
}
</code></pre>

<p>I see log "result ok". I think it meens camera did work well.
But then i see: Failure delivering result ResultInfo{who=android:fragment:2, request=100, result=-1, data=null}. How it can be?!</p>

<p>Well, i tried Uri selectedImage = imageReturned.getExtras().getParcelable(); but i have not a key in my intent to put it into getParcelable(String key).</p>

<p>So, why result is ok, but data=null?</p>