Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // to call camera
- String _path = Environment.getExternalStorageDirectory()
- + File.separator + "TakenFromCamera.png";
- File file = new File(_path);
- Uri outputFileUri = Uri.fromFile(file);
- Intent intent = new Intent(
- android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
- intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
- startActivityForResult(intent, 1212);
- // in activity onResult
- if (requestCode == 1212) {
- String _path = Environment.getExternalStorageDirectory()
- + File.separator + "TakenFromCamera.png";
- mBitmap = BitmapFactory.decodeFile(_path);
- if (mBitmap == null) {
- } else {
- Intent intent = new Intent(AYGCamActivity.this,
- myGalleryImage.class);
- startActivity(intent);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment