I'm working on an app that takes a picture and then switches to a new activity. Here is the function that does so:
public void takePhoto(View view){
final int REQUEST_IMAGE_CAPTURE = 1;
// open camera
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if(takePictureIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
}
// open "Enter Info" screen
startActivity(new Intent(MainActivity.this, EnterInfoActivity.class));
}
However, the "Enter Info" activity opens before the camera. I would like the camera to open before starting the new activity. Pressing "back" brings me to the camera, which to me means that the camera does indeed load, but the activity is given a higher priority.