Created
September 3, 2018 12:34
-
-
Save shubhamnikam/422d1ec597de02d8eae22461044af4dc to your computer and use it in GitHub Desktop.
Implicit Intent - Open Camera
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
intentCamera.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
if (intent.resolveActivity(getPackageManager()) != null) { | |
startActivityForResult(intent, 1); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment