This code works for me, and OnActivityResult is called:
void useCamera()
{
Intent intent = new
Intent(Android.Provider.MediaStore.ActionImageCapture);
string xp =
System.IO.Path.Combine(Android.OS.Environment.ExternalStorageDirectory.Name,
"Android/data/com.myprereg.leads/file/capturedBadge.jpg");
Java.IO.File xfile = new Java.IO.File(xp);
if (xfile.Exists())
xfile.Delete();
try
{
if (!xfile.Exists())
{
Console.WriteLine("File {0} does not exist", xp);
xfile.ParentFile.Mkdirs();
xfile.CreateNewFile();
}
}
catch (Exception ex)
{
Console.WriteLine("Error: {0}", ex.Message);
}
_badgeFileUri = Android.Net.Uri.FromFile(xfile);
Console.WriteLine(_badgeFileUri);
intent.PutExtra(Android.Provider.MediaStore.ExtraOutput,
_badgeFileUri);
StartActivityForResult(intent, TAKE_PICTURE);
}
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Using-the-device-camera-and-getting-a-result-OnActivityResult-is-NEVER-called-tp4902905p4902949.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid