for taking photo use this code
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File file = new File(Environment.getExternalStorageDirectory(), "test.jpg");
outputFileUri = Uri.fromFile(file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(intent, TAKE_PICTURE);
for save ur photo
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
if (requestCode == TAKE_PICTURE)
{
//Uri contentURI = Uri.parse(data.getDataString());
ContentResolver cr = getContentResolver();
InputStream in = null;
try
{
in = cr.openInputStream(outputFileUri);
Log.i("URI ===> ", outputFileUri.getPath());
}
catch (FileNotFoundException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
if(in!=null)
{
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize=8;
bit = BitmapFactory.decodeStream(in,null,options);
}
}
finally upload photo to server try using ksoap webservices