Is it possible to distinguish the cause of application deactivation?
Aplpication enters the deactivated state when users press back button or there is a call\SMS. My question is - how to distinguish the cause? It is important to prevent cheating etc.
I have time counter - it will be ok to freeze it when there's income call or SMS. In case of pressing back button it shouldn't be saved.
Haven't tested it but it may work:
OnNavigatedToand set the flag to falseNow, when the
Desactivatedevent is triggered, if the flag is set to true then you know the user has pressed the back button.