Can you turn on the debug log flag in SystemMessageInternal.js and
SystemMessageManager.js?
That would show more helpful log :)

On Sun, Jan 24, 2016 at 10:55 AM, Sammy Patenotte <[email protected]
> wrote:

> Hi everyone,
> I have an application that I am currently testing, and I want it to
> receive some messages from Gecko. For that I've set up the place where I
> want to send the message as follows (in Gecko):
>     XPCOMUtils.defineLazyGetter(this, "messenger", function() {
>       return Cc["@mozilla.org/system-message-internal;1"]
>            .getService(Ci.nsISystemMessagesInternal);
>     });
>     messenger.broadcastMessage(messageType, message);
>
> And in my app, I have a file called messageHandler.html, with this line to
> receive the messages:
>     navigator.mozSetMessageHandler(messageType, logMessage);
> (logMessage just being a function that logs the received messages, for
> testing purposes).
>
> I have added the following lines to my manifest file:
>     "messages": [
>         { "privacy-request-notification": "/messageHandler.html" }
>     ]
>
> I've also added this message type to the
> SystemMessagePermissionsChecker.jsm:
>     "privacy-request-notification" : {}
>
> The problem is I still can't receive the messages, am I missing something?
> The adb logcat shows that the system does register this message type at
> boot, but after that, nothing:
>     I/Gecko   (  209): SystemMessagePermissionsChecker.jsm:
> isSystemMessagePermittedToSend(): aSysMsgName:
> privacy-request-notification, aPageURL: app://
> test-app.gaiamobile.org/index.html, aManifestURL: app://
> test-app.gaiamobile.org/manifest.webapp
>     I/Gecko   (  209): SystemMessagePermissionsChecker.jsm:
> getSystemMessagePermissions(): aSysMsgName: privacy-request-notification
>
> Best,
> Sammy.
> _______________________________________________
> dev-fxos mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-fxos
>
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to