i want to save pictures directly to my application after taking from default camera in android .how can i make a link to my application so that after taking the picture it should ask me to save in my application or not. please help me How can i do this .please provide me a similar code so that i can understand better.
Asked
Active
Viewed 218 times
1 Answers
0
you should start the camera by intent as follows..
Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(i, CAMERA_RESULT);
and save your image SDCard as follows..
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (resultCode == RESULT_OK)
{
Get Bundle extras = intent.getExtras();
Bitmap bmp = (Bitmap) extras.get("data");
imv = (ImageView) findViewById(R.id.ReturnedImageView);
imv.setImageBitmap(bmp);
}
}

Sujit
- 10,512
- 9
- 40
- 45