take an example here https://gist.github.com/prime31/5675017
but I have a problem. wrote the handler for a push when the app is opened or minimized, the notification comes. but when closed/killed push comes. have tried a bunch of options.
still do not understand must come when the app is closed? or not, or comes not through php