Why do I get null in data parmeter of onActivityResult
问题 I use the following code to take picture from the android camera, after taking the pic onActivityResult is called with data parameter equals NULL. Code - public void getpic(View v){ Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); // Ensure that there's a camera activity to handle the intent if (takePictureIntent.resolveActivity(getPackageManager()) != null) { // Create the File where the photo should go File photoFile = null; try { photoFile = createImageFile(); }