Android activity in PageRenderer

Egor.5781Egor.5781 USMember
edited December 2015 in Xamarin.Forms

Hi All,
I creating cross-platform application which using camera to take shots, to call a camera activity I using page renderer, as folows:

public class CameraPageRenderer : PageRenderer
{
const int CameraResulCode = 100500;

    protected override void OnElementChanged (ElementChangedEventArgs<Page> e)
    {
        base.OnElementChanged (e);
        string filePostfix = clsDInfo.PictureSequence;

        Intent intent = new Intent(MediaStore.ActionImageCapture);
        var _fileName = "somefilename";
        intent.PutExtra (MediaStore.ExtraOutput, NetDroid.Uri.FromFile (_fileName));

        ((Activity)this.Context).StartActivityForResult (intent, CameraResulCode);
    }

}

So question is following, How I can get some kind of OnActivityResult() here?
Is any way to detect that camera activity has done work ?

Tagged:

Best Answer

Answers

  • Egor.5781Egor.5781 USMember

    Thank you Adam, this information was very helpfull!

  • BotyoNikolovBotyoNikolov USMember ✭✭

    Adam, you are the best! Just the info I needed! Thanks

Sign In or Register to comment.