I developed an app with xamarin forms. when I keep the app running on the background for a long time(2-3 hours), the application is going to a state where it can't make any rest calls. it throws an "object reference not set to an instance of an object" error when I try to create the httpClient.
here is the code,
var client = new HttpClient(new NativeMessageHandler());