Intent intentCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
caminhoFoto = getExternalFilesDir(null) + "/" + System.currentTimeMillis() + ".jpg";
File arquivoFoto = new File(caminhoFoto);
Uri fileUri = FileProvider.getUriForFile(FormularioAlunoActivity.this, "com.example.myapp.fileprovider",
arquivoFoto);
intentCamera.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
// inicia activity e obtém o resultado
startActivityForResult(intentCamera, RETORNO_FOTO);