There is an activit in which in onCreate I call a fragment of the video player. In the fragment there are methods:
@Override public void onResume() { onResume(); //Воспроизвел видео } @Override public void onPause() { onPause(); //Остановил видео } Further there are such programs for the release of the OP. For example, a task manager. I clicked to stop the process, stopped, but onDestroy does not work either in the activation or in the fragment. Accordingly, it turns out I start the program again, and first the old fragment goes, and from the bottom it is new, and the video starts to play two. Link to the old player has already been lost. How to make onDestroy work?