I am integrating facebook with android and I want when taking a phot , save it to sdcard and then upload it to facebook.
Here is my code:
photo_up=(B
While using the generic code available on net to call camera and take photo and retrive it, I faced some problem in SAMSUNG device at that time the same error occured Failure delivering result ResultInfo
and couldn't find any solution may be its because of any API Level or Device dependancy.
But to overcome it I wrote my code another way to do the task, The code is here:
1) 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);
2) In ActivityResult to get Bitmap
if (requestCode == 1212) {
String _path = Environment.getExternalStorageDirectory()
+ File.separator + "TakenFromCamera.png";
mBitmap = BitmapFactory.decodeFile(_path);
if (mBitmap == null) {
// bitmap still null
} else {
// set bitmap in imageview
}
}