After some days of experiments I finds Xamarin.Forms really-really cool, I am getting to feel the 'taste' of it. Now I decided to start developing a more complex app. I have question about its structure.
In my app I need periodically make HTTP requests and parse their response. It must run during the whole time, when app is in active-visible state (not stopped, not paused, not in the background etc), it not depends the current visible view controller / activity.
I found Device.StartTimer that can be used in PCL to make my requests periodically, but I could not decide yet, where to hold a single instance of my DataFetcher class (it can not be static!) which's methods should be called periodically. Should I create a singleton class in my PCL? Where to hold it as a property? E.g. in IOS I could store it in AppDelegate (...), but I don't know if there is a cross-platform way for it.
And how do I know about the lifecycle of the app? Should I handle it in the .android and .ios projects, or is there some cross-platform way to do it?
Thank you very much!