When the user clicks on the menu button of the 6DoF right controller the system proceeds to destroy the surface of the application. It then calls the methods
onPause()
onStop()
But it never calls onDestroy() as it should (see here).
The problem is that it is impossible for applications to know whether they have exited the security zone or whether they're being closed because the exact same sequence of methods is called. It's critical to differentiate both scenarios because in the former we just want to stop the application and wait for the user to reenter the security zone, but in the latter we have to free the application resources and exit.
So the solution here is to properly implement the Android Activity lifecycle and make the appropriate calls. Another option could be to fix #42 and let the application handle the shutdown by itself.
When the user clicks on the menu button of the 6DoF right controller the system proceeds to destroy the surface of the application. It then calls the methods
onPause()
onStop()
But it never calls
onDestroy()
as it should (see here).The problem is that it is impossible for applications to know whether they have exited the security zone or whether they're being closed because the exact same sequence of methods is called. It's critical to differentiate both scenarios because in the former we just want to stop the application and wait for the user to reenter the security zone, but in the latter we have to free the application resources and exit.
So the solution here is to properly implement the Android Activity lifecycle and make the appropriate calls. Another option could be to fix #42 and let the application handle the shutdown by itself.