changes in sendGCM function, to use a manager as an argument.
changes in sendMPNS function, to use a manager as an argument.