Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Android activity in PageRenderer

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>