Unsolved Program architecture with Android service
-
Hello,
I'm working on a media player using Qt/QML, QtAV, TagLib and MediaInfo. The target platforms are Windows, desktop Linux and Android. After some progress I now got to the point when I would like to implement proper Android support.
The first thing that needs to be done is service support. There are 2 main reasons why I want to do that. The first is that audio playback stutters if my player is not the foreground application. I hope using a service I could improve this. The other thing is that the whole player (including GUI) doesn't need to be in memory when it is a background app and the playback service should be resistant to system, so it won't get killed so easily.
Now the question is how this should be implemented. I read the guide here.
Now I have following questions:
-
Should I implement a separate playback service or should I create service from the whole application? When in background, the application basically just waits for track end and then starts next track from playlist. So there is not a lot of work done anyway.
-
How do I ensure that the application still runs on other platforms? If I decide to separate the playback service, how would it work on Windows for example?
What would you suggest? I would like to get an advices from more experienced people before I start doing something completely wrong.
-