RPB
RPB

Reputation: 16330

Capture image with camera and hide additional camera settings

I am using MediaStore.ACTION_IMAGE_CAPTURE intent to launch camera view and i am able to successfully capture the images and all working fine.

Sample code written below,

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);

// start the image capture Intent
startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);

My concern is when camera is launched and there are additional icons like, mode, settings of camera can i somehow hide it. I have seen this happening when you use thir-dparty apps/chat apps like whatsapp or Viber or Hike there is just plain button to capture the image.

How do i disable additional stuffs being show on camera's photo/image capture screen which is launched through my app or is there any way to achieve this?

Upvotes: 1

Views: 871

Answers (2)

CommonsWare
CommonsWare

Reputation: 1006674

My concern is when camera is launched and there are additional icons like, mode, settings of camera can i somehow hide it

No.

I have seen this happening when you use thir-dparty apps/chat apps like whatsapp or Viber or Hike there is just plain button to capture the image.

They are using the camera APIs directly, rather than launching some external application to take a picture.

Upvotes: 0

Sohail Zahid
Sohail Zahid

Reputation: 8149

These app are not using installed cam app for capturing they create thier own view with cam streaming.

Here is sample app with cam streaming library included.

Very Easy integration

Note: 1.4.1 well not compile then try with 1.2.3

compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity);

    Uri imageUri = ...;
    mGPUImage = new GPUImage(this);
    mGPUImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.surfaceView));
    mGPUImage.setImage(imageUri); // this loads image on the current thread, should be run in a thread
    mGPUImage.setFilter(new GPUImageSepiaFilter());

    // Later when image should be saved saved:
    mGPUImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}

Upvotes: 1

Related Questions