The camera opens, and i can "snap" a picture, but when i choose "Save" or
"Ok", depending on device, it hides all activities and returns to the device
home screen, although the app is still running in the background.  Now the
code i'm using came from:
http://achorniy.wordpress.com/2010/04/26/howto-launch-android-camera-using-intents/#comment-346,
and when i run it in JAVA, OnActivityResult IS called, but when I run it in
c#/mono, it is NOT called

Below is my code.

public void StartCamera()
        {
            Context context = this;

            //define the file-name to save photo taken by Camera activity
            String fileName = "new-photo-name.jpg";
            //create parameters for Intent with filename
            ContentValues values = new ContentValues();
            values.Put(MediaStore.Images.ImageColumns.Title, fileName);
            values.Put(MediaStore.Images.ImageColumns.Description, "Image
capture by camera");
            //imageUri is the current activity attribute, define and save it
for later usage (also in onSaveInstanceState)
            Android.Net.Uri imageUri = context.ContentResolver.Insert(
                    MediaStore.Images.Media.ExternalContentUri, values);

            //create new Intent
            Intent intent = new Intent(MediaStore.ActionImageCapture);
            intent.PutExtra(MediaStore.ExtraOutput, imageUri);
            intent.PutExtra(MediaStore.ExtraVideoQuality, 1);

            this.StartActivityForResult(intent, 1337);

        }

       protected override void OnActivityResult(int requestCode, Result
resultCode, Intent data)
        {
            Log.Info("HAGRID", "Activity Result Called");
            base.OnActivityResult(requestCode, resultCode, data);
            Log.Info("HAGRID", "Activity Result, request code: " +
requestCode + " -- result code: " + resultCode + "");
        }


Can anyone enlighten me ?


Thanks,
Brian Matz
Software Architect
Mobile Epiphany
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to