We have an application to pop up an audio alert using JavaFx.This pop up will play audio alert from 3rd party url and will play untill user action.This functionality is working fine.But the thread which is created by media player is still running even after the player is stopped.
Flow of my application.
1. Main screen to show history by default.when an alert is received by my application we will remove the main screen and display the pop up screen with audio alert.
2. The pop up screen will contain multiple alerts in the page and will be displayed in single pop up screen. Ex below,
1 Alert 1
2 Alert 2
3. When an alert is received the memory of the application is increased and not reduced even after the player stops playing the alert.
4. We found the background process and came to know that media player is keeping the thread until the main application is closed.
5. If we close the main application then user will not get any alert, for that he/she needs to log -in once again in the app.
6. Is there any way to kill the media player thread after closing the pop up page with out closing the main application.?
7. System.exit () will close the entire application but we should not use that since app has to run to get next alert.