Tôi đang gặp rắc rối với các tài nguyên trên các nhà phát triển Android cho máy ảnh, đây là mã của tôi:MEDIA_TYPE_IMAGE không được công nhận
// create Intent to take a picture and return control to the calling application
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
// create a file to save the image
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name
// start the image capture Intent
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
Vấn đề là 'MEDIA_TYPE_IMAGE' mà nói rằng nó không thể được giải quyết cho một biến . Tôi có mediastore, camera và URI được nhập vào dự án của tôi. Cảm ơn trước!
Tôi không hiểu câu trả lời này cho đến khi tôi tìm thấy mã này ở đây: http://developer.android.com/guide/topics/media/cam era.html # saving-media –