Xamarin.Android OnActivityResult not being called inside a Fragment

前端 未结 4 408
梦毁少年i
梦毁少年i 2021-01-14 04:46

It appears as if OnActivityResult does not get called after accepting the picture taken from the camera.

Am I calling StartActivityForResult() wrong?, or is

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 05:20

    Try changing the data type of resultCode to int, instead of Result and making the overridden function public.

    e.g.

    public override void OnActivityResult(int requestCode, int resultCode, Intent data)
    {
        base.OnActivityResult(requestCode, resultCode, data);
    }
    

提交回复
热议问题