# Visual Basic > Xamarin >  How to Track Online / Offline Status of the user

## vuyiswamb

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***





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


***OnSleep***





```
protected override async void OnSleep()
                { 
                            await Task.Run(() => OnlineStatuspdate(0)); 
                }
```

***OnResume***



```
 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

----------

