Unknown member in Xamarin.Android

Hi all,

I am trying to get bitmap form Uri, when I debug my code it shows me image = null and these messages when I hover mouse pointer on OpenInputStream(App._uri) and DecodeStream(_stream) methods

Messages:
(1) Unknown member: OpenInputStream
(2) Unknown member: DecodeStream

How can i solve this error. Here is my code:

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
    {

        base.OnActivityResult(requestCode, resultCode, data);
        if (_activityResultCallback != null)
        {
            _activityResultCallback.Invoke(requestCode, resultCode, data);
            _activityResultCallback = null;
        }
        if (requestCode == 2)
        {

            System.IO.Stream _stream = null;
            _stream = ContentResolver.OpenInputStream(App._uri);
            Bitmap image = BitmapFactory.DecodeStream(_stream);
            string _bitmapString = image.ToString();
            byte[] byteArray = Encoding.UTF8.GetBytes(_bitmapString);
            MemoryStream stream = new MemoryStream(byteArray);
            ImageSource imageSource = ImageSource.FromStream(() => new MemoryStream(byteArray));
            ImageSelected.Invoke(this, new ImageSourceEventArgs(imageSource));=

        }
    }
Sign In or Register to comment.