Coder Social home page Coder Social logo

brotkrumen's Introduction

ReadMe.md

Author: Richard Maher [email protected]

Release: 20-Jul-2017 - Initial POC release. 12-Sep-2017 - 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. 06-Jul-2018 - Copied to GitHub

Brotkrumen Ultimate Web App

Raison D'etre: - To prove unequivocally once and for all that the ServiceWorker paradigm supports Background Geolocation perfectly as the functionality delivery mechanism for Web Apps.

An unacceptable level of ignorance pervades the W3C/IETF ServiceWorker corridors leading to false assumptions that ServiceWorker instance lifespans are so fleeting as to be incapable of serving more than a single geolocation update. This Web App proves otherwise. The flag's dropped so the FUD must stop! ServiceWorkers are being held back and hamstrung by the Offline-First fanatics and zealots.

Run-time test considerations

Obviously, the TravelManagerRegistration in the example is currently only a pollyfill. Therefore, to be able to properly test geolocation change output, your phone needs to be on/not-asleep and Brotkrumen in the foreground. On my Samsung Galaxy S7, the longest the screen can be active constantly is 10mins but if you enable Developer Tools and plug it into your charger it can stay active forever.

NB: I prefer to use Firefox as due to an existing bug ( https://bugzilla.mozilla.org/show_bug.cgi?id=1254911 among others) Firefox continues to deliver GPS updates in the background. Put your phone in your pocket and off you go; just like it should be!

Files in this directory: -

Just copy all of these files to your Web Server and navigate to /TravelManager.html and then save the Ultimate Web App to your homescreen. Once the Web App is active, go for a walk, ride, or drive and watch the Service-Worker-Instance to Position-Update ratio scream at you that "This is the solution!" to the background geolocation conundrum.

brotkrumen.cssStyle Sheet
webapp.jsonManifest
echo.jsServiceWorker using Message Events to simulate the TravelEvents that need to come from UA.
gingerbreadhouse.pngShortcut/Homescreen icon
handlemap.jsThe code needed to plot and replay the trip onto Google Maps. (Uses CSS Transitions for a 'smooth' trip)
hg.pngOur protagonists
registerserviceworker.jsServiceWorker Registration and TravelManager subscription
striped-witch-hat.pngDestination marker icon.
sw745.htmlUncensored copy of Issue 745 from https://github.com/w3c/ServiceWorker/issues Look from June 7.
travelmanager.htmlDemo Web App that interacts with TravelManager.
travelmanagerpolyfill.jsAll the UA developers have to do to support background geolocation. How hard can it be?

All feedback welcomed!

brotkrumen's People

Contributors

richardmaher avatar solzhenitsyn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.