79657179

Date: 2025-06-07 16:57:19
Score: 1.5
Natty:
Report link

https://grok.com fixed it.

@Override
    protected void onDestroy() {
        // Release the MediaController and player
        if (mediaController != null) {
            mediaController.stop();
            mediaController.release();
            mediaController = null;
        }
        if (controllerFuture != null) {
            controllerFuture.cancel(true);
        }
        if (playerView != null) {
            playerView.setPlayer(null);
        }

        // Stop the foreground service
        Intent serviceIntent = new Intent(this, PlaybackService.class);
        stopService(serviceIntent);

        super.onDestroy();
    }
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: ahmadreza gh