I'm able to get an endpoint successfully, but after that the issues start.

The "messages" attribute from the manifest gets ignored or at least the files 
listed there will never be called (no matter what they contain):

        "messages": [
                { "push": "/ff/push-message.html"},
                { "push-register": "/ff/push-message.html"}
        ],


Normally the following code would be within push-message.html (as suggested by 
the official Simple Push example):

window.navigator.mozSetMessageHandler('push', function(e) {
        console.log("endpoint reached");
});

But as push-message.html never gets called, I put it instead in my main page 
and the handler gets successfully called. The downside to this is that it only 
gets called, if the app is in memory (in fore- or background). If it is not 
(e.g. if device just started and app was not started yet), nothing is called.

Am I doing something wrong or are these 2 issues known bugs or even limitations?

This is about a hosted app (not a packaged app) in case it matters.

Thanks,
Michael
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to