@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.picture_choice_activity);
Button takePictureButton = (Button)findViewById(R.id.takePictureButton);
takePictureButton.setOnClickListener(new OnClickListener() {
public void onClick(View v){
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, IMAGE_CAPTURE);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == IMAGE_CAPTURE){
if(resultCode == Activity.RESULT_OK){
// I should get the path here
}else if(resultCode == Activity.RESULT_CANCELED){
}
}
}
在上述法典中,我试图找到被抓住的形象。 我不应利用EXTRA_OUTPUT来说明挽救形象的习俗途径。 我如何能够这样做?