For complete details, and a more lengthy description, please refer to this W3C Service worker issue.
This is my HTML5 Web App scenario: -
My question are these: -
1) Will the Focus event fire before or after all of the Message events triggered by the ServiceWorkers?
2) If Focus is first will a setTimer(0,backlogCleared) suffice as a heuristic mechanism to establish "all background stuff dealt with"?
3) Is there anyway to collapse the postMessage() messages (al la mode Firebase's push notifications) so that only the last/current message is received?
4) If you have ideas about the permissions required to authorize background geolocation please add them over at W3C.
Cheers and good riding, running, sailing, driving!
A background service worker is loaded when it is needed, and unloaded when it goes idle. Some examples of events include: The extension is first installed or updated to a new version. The background page was listening for an event, and the event is dispatched.
A background service worker is loaded when it is needed, and unloaded when it goes idle. Some examples of events include: The extension is first installed or updated to a new version. The background page was listening for an event, and the event is dispatched. A content script or other extension sends a message.
The lifetime of a background service worker is observable by monitoring when an entry for the extension appears and disappears from Chrome's task manager. Open the task manager by clicking the Chrome Menu, hovering over more tools and selecting "Task Manager". Service workers unload on their own after a few seconds of inactivity.
Another view in the extension, such as a popup, calls runtime.getBackgroundPage. Once it has been loaded, a service worker keeps running as long as it is performing an action, such as calling a Chrome API or issuing a network request.
My Brotkrumen Ultimate Web App is now complete. All source/image files can be found at https://drive.google.com/open?id=0B7Rmd3Rn8_hDNW1zSWRoXzBTclU
Most important design/proposed-specification change is that TravelManager subscription should now be Client specific. The TravelEvent must contain the intended Client.id (TravelEvent.source.id). This means that the UA must monitor and filter GeoLocation updates per client. I have also added new demo functionality such as a Trip Summary that is displayed when you press the "Arrive" button. The trip can also be replayed onto Google Maps by pressing "Map Trip" or "Replay". If the last and next geolocation updates for the trip are both visible in the Map window then smooth Marker movement is achieved via CSS transitions.
PLEASE help Background GeoLocation get up and help Web Apps compete with Native Apps!
If there is something wrong with my TravelManager solution design then let me know. Tear holes in it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With