0

OnePlus 3携帯電話でカメラを起動しようとすると、この問題がどのように解決されるのか教えてください。ラインOnePlusでカメラがプログラムで開かない3 Android Phone OS v 6.2

intentCamera.putExtra(MediaStore.EXTRA_OUTPUT, mImageCaptureUri); intentCamera.putExtra("return-data", true);

を次..

File tempFile = createFile(); 
    if (intentCamera.resolveActivity(getPackageManager()) != null) 
    { 
      if (tempFile != null) 
      { 

       mImageCaptureUri = Uri.fromFile(tempFile); 

       intentCamera.putExtra(MediaStore.EXTRA_OUTPUT, mImageCaptureUri); 
       intentCamera.putExtra("return-data", true); 
       startActivityForResult(intentCamera, ConstantString.REQUEST_CODE_TAKE_PICTURE); 
      } 
     } 

答えて

0

削除カメラの意図を起動中にエクストラを渡す必要はコード使用して、次の。

File tempFile = createFile(); 
    if (intentCamera.resolveActivity(getPackageManager()) != null) 
    { 
      if (tempFile != null) 
      { 

       mImageCaptureUri = Uri.fromFile(tempFile); 
       startActivityForResult(intentCamera, ConstantString.REQUEST_CODE_TAKE_PICTURE); 
      } 
     } 
+0

どのように結果onActivityResultを受け取ることができますか? –

関連する問題