Can you tell if the player has quit the app on android and iOS?

Hello,

As the title states I would like to know if a player has quit an app on android and iOS. That is he has clicked the home button on his device and left.

It sounds like an odd thing to ask but I am using Playtomic and I would like to know how long the player has spent in the app before going away.

Thanks for any help,

David

2 Answers

2

You can check for OnApplicationPause to check if the Home button was pressed.

Or OnApplicationQuit if the game was actually closed.

As far as I know it works for both yes. Although as always make sure you test it within your games context instead of assuming.

Try implementing IDisposable in the class that reccords the information.

Not sure it’ll actually work for iOS though but worth a try :smiley: