I am developing a Music App and for that I have implemented a “MusicService” which loads stuff from the storage, holds the current Queue and so on.
Right now I only have one page, where this Service gets injected in the constructor and I call everything with
Now I want to make a second Page with Playlists, but that needs to have access to the MusicService too.
If I just pass it in the constructor I will have two instances of the service right?
How can I make it that every Page has the same instance of MusicService?
Thanks for any help!
I will provide Code if needed