You're probably right. But my problem is when the app is hidden, not closed. Not sure what I am doing wrong here.
One thing I'm still trying to get my head around is in what order code executes. I seem o have to use $timeout()
a lot so that things don't execute before the should. Maybe that's part of my problem?