I have worked on an app like a birthday reminder. Here i need a UI and background thread simultaneously: a thread that starts running after installing app and is always running in background, not affected by the UI. Opening or closing the UI should not affect the thread. It runs until the app is uninstalled. The thread always checks for updates in a database every 1 minute, silently in background .
The problem is when I close the UI, the thread is stopped automatically, and when i again open the app UI, it starts again.
Why is this? I want my thread always running..