Abhishek Dhotre
Abhishek Dhotre

Reputation: 511

Android: Open camera without using the native camera application

I'm looking for a functionality to start camera without using the native camera application in my android app. I would like to have just a button to click photos without other options present in the native app like HDR, Flash, Settings, filters and so on. Currently, I'm using following code which opens the native camera app

Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_REQUEST);

Upvotes: 0

Views: 267

Answers (1)

user8562054
user8562054

Reputation:

Use this code and give diffrent package name of camera apps like pixler,pic art,adobe Photoshop

when u click button and intent works and direct open selected app.....

PackageManager pm = context.getPackageManager();
Intent launchIntent = pm.getLaunchIntentForPackage("com.example.package");
context.startActivity(launchIntent);

Upvotes: 1

Related Questions