Closed Bug 1128220 Opened 8 years ago Closed 8 years ago
.moz Set Message Handler('request-sync') not called in packaged app case
Using a nightly/master build of b2g from Friday January 30 on a Flame device, a certified packaged app that tries to use navigator.sync to get navigator.mozSetMessageHandler('request-sync') calls after the app is closed does not seem to work. The test was run on a flame device continually connected via USB and on Wifi, but also had a non-data enabled SIM card installed. I have attached a zip of a small test app that shows the behavior, with the js/main.js containing the interesting parts: * Unzip the zip, find the "requestsync" directory that has the manifest.webapp. * Use the WebIDE to push the app in that directory to the flame device. Watch the logcat as the app is used. The index.html has some details, but basically: * Register a task via navigator.sync.register() button * Confirm it is registered by using the button that shows the sync.registrations(). * Completely close/kill the app and wait 100 seconds. Expected: app is launched around 100 seconds later and the console.log in the navigator.mozSetMessageHandler('request-sync') function callback shows up in the log. Actual: app does not seem to launch after 100 seconds.
You forgot to declare the request-sync message in your manifest it seems?
Ah right, that was it. Got a big confused with the permissions and then the navigator.sync() taking a wakeUpPage, so did not think to put in the messages block. Thanks for the second pair of eyes.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.