If I were clever, I’d say that it is “you don’t talk about programming”. Since I’m not clever, I submit that the first rule of programming is “check to see if somebody else already figured it out”. The answer is yes at least 85% of the time, and usually that person did a better job than you would if you’re rushing towards a bigger and better goal. On that note, I found this cool thing today.
I’ve been thinking over approaches for dealing with the issue of MM getting onPause()’d, and have tried my hand at a few snippets of code so far. I still rather like my approach of the downloads happening in a service while the background thread deals with sorting results. I believe that Käppler‘s approach will save me a lot of time on coding my onResume()/onPause() and generally laying out the structure. I haven’t studied his code intesively enough yet, but it already looks much more promising than what I frantically hacked up last week on the subject.
So, next time you’re about to scratch-code something difficult, talk to Uncle Google and see if some helpful person already solved the problem for you! 🙂 …and that is all from me for the week, as I’m going on vacation. Enjoy the silence!