Good Day Everyone

i am tracking the users status on the app from the events in app.cs , i use the following tracking like this

**OnStart**



Code:
    protected override async void OnStart()
        { 
                    await Task.Run(() => OnlineStatuspdate(1));    
     }

**OnSleep**



Code:
protected override async void OnSleep()
                { 
                            await Task.Run(() => OnlineStatuspdate(0)); 
                }
**OnResume**

Code:
 protected override async void OnResume()
        {  
  await Task.Run(() => OnlineStatuspdate(1)); 
        }
after all this the status of some users remain online even though the users closed the app. can one advice on this.

Thanks