0

I'm developing an Android App on Xamarin. During the async call to a webservice (about 1 - 2 seconds) if i rotate the screen it crashes.

Is there a way to let the webservice call to continue its call even if i rotate the screen?

It is necessary to rotate the screen because i have to read a barcode on landscape mode, and when i return to Portrait mode it fails.

I do the call in this way:

myItem = await Item.GetItem(itemId);

and this is the OnCreate method that has been called every time i rotate the screen

        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
        }
pasluc74669
  • 1,680
  • 2
  • 25
  • 53

0 Answers0