Forum Xamarin.Forms

How to Control Xamarin.Forms Android DispatchTouchEvent While Working on MainThread?

AnbuMani27AnbuMani27 USMember ✭✭✭

In our Application when the user launching the application we are doing multiple task on MainThread which are majorly running on the secondary task like

  • Initialize Google Map & Creating Pins & Polyline Drawing
  • Firebase Listener Register
  • REST API calls
  • Loading List Items

So, Before the device completes the above the listed task the users are keep on touching the screen, So this causes multiple events are queued in the main thread, because of that we are getting ANR(App Not Responding Popup).

Here, our intention is to disable the touch event until we complete the main thread in the existing task.

Sign In or Register to comment.