I came across plenty of code and I am confused.
My goal is when I launch the app, the front camera automatically launches as well. Then by clicking the button I have in the app it would take pictures and save it in the main gallery.
to call the camera:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivity(intent);
MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
This is a school project. My teacher told us to come up with something cool.