here is my problem, when i try to get the Uri from the picture that I take whit the camera i get null with the camera on emulator and my device, but only whit the system cam
Android might have killed off (and restarted) your activity before you get into onActivityResult
, for instance because you rotated your device while taking the picture. Try to store and restore outputFileUri
with the rest of the Activity state...
protected void onSaveInstanceState(Bundle outState)
{
outState.putParcelable("outputFileUri", outputFileUri);
}
...
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
if (savedInstanceState != null)
{
outputFileUri= savedInstanceState.getParcelable("outputFileUri");
}
}