I do not think that I can give you a exact answer to you question since it is very brad thing to answer. But I will try to give you some high-level guidance to your approaches.
Generally using Fragments is the best way to write an Android application and now it is the recommended way.
You can make another application to work on behalf of your application using Intents in Android. Which is you can start the Camera Application installed on your device to take the images on behalf of your application.
static final int REQUEST_IMAGE_CAPTURE = 1;
private void dispatchTakePictureIntent() {
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
}
}
You can read more from here
But these camera APIs come into play if you want to write your own custom Camera API. Because there are scenarios where you actually want your own custom camera functionality for your special requirements of the application you are building.
So decide what is that you want to achieve. If you just want to get a photo and save it you can simply use Intent and request the camera application to take the photo for your application.
To get more in depth understanding on camera APIs you can start from here
Edit,
Yes you can actually do something like following
if (Build.VERSION.SDK_INT > 9) {
and have different execution paths depending on the version.