I actually got this all working.
1. I run the app - the app checks if there is any config file
2. if there is a config file it loads it and exits
3. if there is no config file it keeps the app opened for new settings to be applied
4. on a system reboot the service is started
5. the service starts the main app
6. the app obviously starts, loads the config if available and exits
Now, which I wanted is:
1. if I start the app manually it should not exit, it should know that I(user) have started the app, it should only wait for input, for different settings etc to be applied.
2. if the app(via service) is started on android boot it should do the exactly thing it's doing now.
Maybe I've now explained it more in details. The app also has root access.
Thank you once again