Question:What is the best way of opening camera as sub-activity? 

A 
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivity(takePictureIntent);
 

B 
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
 if (takePictureIntent.resolveActivity(getPackageManager()) != null) {   startActivityForResult(takePictureIntent, 1); 
}
 

C 
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1);
 

D 
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
 if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, -1); 
}
 

+ Answer
+ Report
Total Preview: 2697

Copyright © 2024. Powered by Intellect Software Ltd