I want when user press 'back button' on android device to exit my app, there is a alert dialog shown to ask user 'Do you want to exit ? (Yes, No)'.
https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.application.pagedisappearing?view=xamarin-forms
I found 'Application.PageDisappearing Event', but I don't know how to write the code.
I have never write the code to work with Event variable.
I need to do the exit alert because my app have TcpClient connection, if the app exit the connection will be disconnect.
I want user use 'home button' to let my app go background, that will be keep the connection alive.