Commit | Line | Data |
---|---|---|
b41707de RK |
1 | <!DOCTYPE html> |
2 | <html> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
5 | <meta name="Author" content="KaiRo - Robert Kaiser"> | |
6 | <title>Firefox OS Tricorder</title> | |
7 | <link rel="stylesheet" type="text/css" href="slides.css"> | |
8 | <script type="text/javascript" src="slides.js"></script> | |
9 | <link rel="contents" href="#index" title="Overview"> | |
10 | <link rel="index" id="link-toc" href="#toc" title="Contents"> | |
11 | <link rel="start" id="link-start" href="#index" title="Start"> | |
12 | </head> | |
13 | <body onload="docLoaded();"> | |
14 | <header id="header"><div id="header-text">Tricorder</div> | |
15 | <div id="subheader-text"></div> | |
16 | <a id="headerlogo" href="#index" title="Startseite">Mozilla</a> | |
17 | </header> | |
18 | <nav id="slidenav"> | |
19 | <a href="#toc" id="nav-toc" accesskey="t">toc</a> || | |
20 | <a href="#index" id="nav-start" accesskey="s">start</a> || | |
21 | <a href="#" id="nav-prev" accesskey="p" hidden>< back</a> | |
22 | <span id="nav-prev-nolink" class="nolink">< back</span> | | |
23 | <a href="#" id="nav-next" id="goNext" accesskey="n" hidden>fwd ></a> | |
24 | <span id="nav-next-nolink" class="nolink">fwd ></span> | |
25 | </nav> | |
26 | ||
27 | <article id="toc" title="Table of Contents"> | |
28 | <h1>Table of Contents</h1> | |
29 | <h2>Firefox OS Tricorder</h2> | |
30 | ||
31 | <div class="captionedbox"> | |
32 | <p class="captionedbox-caption">The following slides are available in this presentation:</p> | |
33 | <div class="captionedbox-content"> | |
34 | <ul id="toc-list"> | |
35 | </ul> | |
36 | </article> | |
37 | ||
38 | <article id="index" title="Start Page"> | |
39 | <h1>Firefox OS Tricorder</h1> | |
40 | <h2>Reading Device Sensor Data in JavaScript</h2> | |
41 | ||
42 | <div class="simplebox"> | |
43 | <mark><a href="http://home.kairo.at/">Robert Kaiser</a></mark>, | |
44 | "KaiRo" <kairo@kairo.at> | |
45 | <br><small>Program Manager, Mozilla QA</small> | |
46 | </div> | |
47 | ||
48 | <div class="captionedbox"> | |
49 | <p class="captionedbox-caption">Slides: | |
50 | <a href="http://slides.kairo.at/fosdem2015/">http://slides.kairo.at/fosdem2015/</a></p> | |
51 | <div class="captionedbox-content small"> | |
52 | <ul class="small"> | |
53 | <li>Created for | |
54 | <a href="http://fosdem.org/2015/schedule/track/mozilla/">Mozilla | |
55 | Developer Room</a> at <a href="http://www.fosdem.org/">FOSDEM 2015</a> in | |
56 | Brussels.</li> | |
57 | <li>Written in HTML 5 with CSS 3 and JavaScript.</li> | |
58 | <li>Navigation via links on all slides, via access keys | |
59 | (e.g. "n"/Alt+Shift+N for "next") or back/forward arrow keys</li> | |
60 | <li><a href="#toc">Contents</a></li> | |
61 | <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/at/"><img | |
62 | alt="Licensed under CC-BY-SA," style="border-width:0;vertical-align:bottom;" | |
63 | src="cc-by-sa-80x15.png"></a> 01/2015 Robert Kaiser - | |
64 | "Mozilla", "Firefox" and their logos are | |
65 | <a href="http://www.mozilla.org/foundation/trademarks/list.html">trademarks | |
66 | of the Mozilla Foundation</a>; <a href="http://www.startrek.com/">Star Trek</a> | |
67 | and related items are trademarks of | |
68 | <a href="http://www.paramount.com/">Paramount Pictures</a>.</li> | |
69 | </ul> | |
70 | </div> | |
71 | </div> | |
72 | </article> | |
73 | ||
74 | <article id="tricorder" title="Tricorder"> | |
75 | <h1>What is a Tricorder?</h1> | |
76 | ||
77 | <div class="simplebox"> | |
78 | <img src="starfleet_tricorder_2370.jpg" class="slidepic" | |
79 | alt="Starfleet Tricorder, 2370"> | |
80 | <p>Sensor device as seen on "Star Trek"</p> | |
81 | <p>Displays whatever data is needed at plot speeds and resolutions.</p> | |
82 | <p class="ensurepicinbox"></p> | |
83 | </div> | |
84 | </article> | |
85 | ||
86 | <article id="fxos-tricorder" title="Firefox OS Tricorder"> | |
87 | <h1>Firefox OS Tricorder App</h1> | |
88 | ||
89 | <div class="simplebox"> | |
90 | <p>Displays sensor data</p> | |
91 | <p><a href="https://marketplace.firefox.com/app/tricorder/">marketplace.firefox.com/app/tricorder/</a></p> | |
92 | <p>Code: <a href="https://github.com/KaiRo-at/tricorder">github.com/KaiRo-at/tricorder</a></p> | |
93 | </div> | |
94 | </article> | |
95 | ||
96 | <article id="ui" title="UI"> | |
97 | <h1>Firefox OS Tricorder UI</h1> | |
98 | ||
99 | <div class="simplebox"> | |
100 | </div> | |
101 | </article> | |
102 | ||
103 | <article id="module" title="Module"> | |
104 | <h1>Module</h1> | |
105 | ||
106 | <div class="simplebox"> | |
107 | <ul> | |
108 | <li>HTML (switch, display)</li> | |
109 | <li>JS Object | |
110 | <ul> | |
111 | <li>2 Methods: activate(), deactivate()</li> | |
112 | </ul> | |
113 | </li> | |
114 | </ul> | |
115 | </div> | |
116 | </article> | |
117 | ||
118 | <article id="position" title="Position Module"> | |
119 | <h1>Position Module</h1> | |
120 | ||
121 | <div class="simplebox"> | |
122 | <p>GPS, WiFi/Cell Location</p> | |
123 | <p>API: Geolocation</p> | |
124 | <p>Permission: geolocation</p> | |
125 | </div> | |
126 | </article> | |
127 | ||
128 | <article id="position-code" title="Position: Code"> | |
129 | <h1>Position: Code</h1> | |
130 | ||
131 | <div class="simplebox"> | |
132 | <pre> | |
133 | this.watchID = navigator.geolocation.watchPosition( | |
134 | function(position) { ... }, | |
135 | function(error) { ... }, | |
136 | {enableHighAccuracy: true, maximumAge: 10000, timeout: 60000} | |
137 | ); | |
138 | ||
139 | navigator.geolocation.clearWatch(this.watchID); | |
140 | </pre> | |
141 | </div> | |
142 | </article> | |
143 | ||
144 | <article id="gravity" title="Gravity Module"> | |
145 | <h1>Gravity Module</h1> | |
146 | ||
147 | <div class="simplebox"> | |
148 | <p>Accelerometer, Magnetic Compass</p> | |
149 | <p>APIs: deviceorientation, devicemotion events</p> | |
150 | <p>Permissions: ---</p> | |
151 | </div> | |
152 | </article> | |
153 | ||
154 | <article id="gravity-code" title="Gravity: Code"> | |
155 | <h1>Gravity: Code</h1> | |
156 | ||
157 | <div class="simplebox"> | |
158 | <pre> | |
159 | window.addEventListener("deviceorientation", this.orientEvent, true); | |
160 | window.addEventListener("devicemotion", this.motionEvent, true); | |
161 | ||
162 | orientEvent: function(orientData) { | |
163 | orientData.alpha / .beta / .gamma (in °) | |
164 | }, | |
165 | motionEvent: function(event) { | |
166 | event.accelerationIncludingGravity.x / .y / .z (in m/s²) | |
167 | }, | |
168 | ||
169 | window.removeEventListener("deviceorientation", this.orientEvent, true); | |
170 | window.removeEventListener("devicemotion", this.motionEvent, true); | |
171 | </pre> | |
172 | </div> | |
173 | </article> | |
174 | ||
175 | <article id="sound" title="Sound Module"> | |
176 | <h1>Sound Module</h1> | |
177 | ||
178 | <div class="simplebox"> | |
179 | <p>Microphone</p> | |
180 | <p>APIs: WebRTC(getUserMedia), WebAudio</p> | |
181 | <p>Permissions: audio-capture</p> | |
182 | </div> | |
183 | </article> | |
184 | ||
185 | <article id="sound-code" title="Sound: Code"> | |
186 | <h1>Sound: Code</h1> | |
187 | ||
188 | <div class="simplebox"> | |
189 | <pre> | |
190 | </pre> | |
191 | </div> | |
192 | </article> | |
193 | ||
194 | <article id="environment" title="Environment Module"> | |
195 | <h1>Environment Module</h1> | |
196 | ||
197 | <div class="simplebox"> | |
198 | <p>Light, Proximity; Flashlight</p> | |
199 | <p>APIs: devicelight, deviceproximity events; Camera API</p> | |
200 | <p>Permissions: ---; camera (for Flash)</p> | |
201 | </div> | |
202 | </article> | |
203 | ||
204 | <article id="environment-code" title="Environment: Code"> | |
205 | <h1>Environment: Code</h1> | |
206 | ||
207 | <div class="simplebox"> | |
208 | <pre> | |
209 | </pre> | |
210 | </div> | |
211 | </article> | |
212 | ||
213 | <article id="device" title="Device Module"> | |
214 | <h1>Device Module</h1> | |
215 | ||
216 | <div class="simplebox"> | |
217 | <p>Battery</p> | |
218 | <p>APIs: Battery</p> | |
219 | <p>Permissions: ---</p> | |
220 | </div> | |
221 | </article> | |
222 | ||
223 | <article id="device-code" title="Device: Code"> | |
224 | <h1>Device: Code</h1> | |
225 | ||
226 | <div class="simplebox"> | |
227 | <pre> | |
228 | </pre> | |
229 | </div> | |
230 | </article> | |
231 | ||
232 | <article id="end" title="The End"> | |
233 | ||
234 | <div class="simplebox"> | |
235 | <h1 class="cent" style="position: relative; z-index: 3; color: #FFFFFF; font-size: 2.5em;">Questions?</h1> | |
236 | <img src="mister_tricorder.jpg" class="sshot" | |
237 | style="width: 100%; margin-top: -4.5em; position: relative; z-index: 1;" | |
238 | alt="Data & Mister Tricorder"> | |
239 | </div> | |
240 | </article> | |
241 | ||
242 | </body> | |
243 | </html> |