Slide 1

Slide 1 text

Customize Your Firefox OS Yuren Ju

Slide 2

Slide 2 text

今天要講這個!

Slide 3

Slide 3 text

http://www.pcworld.idg.com.au/article/465951/developers_express_enthusiasm_firefox_os_survey_shows/

Slide 4

Slide 4 text

Running game on Browser without plugins

Slide 5

Slide 5 text

MinGW for Windows developers

Slide 6

Slide 6 text

Yuren Ju ● KaLUG ● Hacking Thursday ● COSCUP ● Mozilla

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

http://www.flickr.com/photos/kky/704056791/ Web Technology

Slide 10

Slide 10 text

https://github.com/coolaj86/logo.js

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

dialer.[js/html/css]

Slide 13

Slide 13 text

? Telephony, FM, Bluetooth, SMS Mobile Connection, Contact Alarm, Ambient Light Sensor Battery, Camera

Slide 14

Slide 14 text

Web API for Firefox OS https://developer.mozilla.org/en-US/docs/WebAPI

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

http://www.mozfans.com/thread-411-1-1.html

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

e.g., bluetooth BlueZ WebBluetooth navigator.mozBluetooth Gonk Gecko Gaia

Slide 19

Slide 19 text

e.g., Infrared? LIRC Linux Infrared Remote Control mozInfrared navigator.mozInfrared Gonk Gecko Gaia Something like this, although we haven't supported infrared yet.

Slide 20

Slide 20 text

Standard! Standard! Standard!

Slide 21

Slide 21 text

Build Firefox OS https://github.com/mozilla-b2g/B2G

Slide 22

Slide 22 text

Build B2G ● git clone https://github.com/mozilla- b2g/B2G.git ● (install a lot of dependencies...) ● ./config.sh ● ./build.sh ● wait 20min ~ 2hr... Zzzzz...

Slide 23

Slide 23 text

But I'm a gaia developer. \o/

Slide 24

Slide 24 text

Firefox & Firefox OS OS Firefox web apps Gaia Gecko + Gonk Hardware Hardware

Slide 25

Slide 25 text

Run Gaia on Firefox Browser! OS Firefox gaia + web apps Gecko + Gonk Hardware Hardware

Slide 26

Slide 26 text

Build for Gaia ● git clone https://github.com/mozilla- b2g/gaia.git ● cd gaia ● make (10~30s except first time)

Slide 27

Slide 27 text

Different Targets... ● make production

Slide 28

Slide 28 text

DEBUG=1 make

Slide 29

Slide 29 text

Built-in Customization Mechanism https://wiki.mozilla.org/B2G/MarketCustomizations

Slide 30

Slide 30 text

Customization Mechanism Gaia Distribution Dir Building...

Slide 31

Slide 31 text

GAIA_DIR/build/settings.js e.g., settings/lockscreen/wallpaper

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

Apps customization

Slide 34

Slide 34 text

build/apps-*.list ● production – apps/* – external-apps/* – outoftree_apps/* ● engineering – apps/* – test_apps/* – showcase_apps/* – test_external_apps/* – external-apps/* – outoftree_apps/*

Slide 35

Slide 35 text

apps.list ● apps/* ● external-apps/twitter

Slide 36

Slide 36 text

Customization Mechanism Gaia /apps/* /external-apps/twitter Distribution Dir /apps/* /external-apps/twitter Building...

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Modify Firefox OS

Slide 40

Slide 40 text

Tools http://www.flickr.com/photos/84906483@N08/8747337118/

Slide 41

Slide 41 text

built-in debugger

Slide 42

Slide 42 text

or you prefer firebug <3

Slide 43

Slide 43 text

Modify color of dock

Slide 44

Slide 44 text

Practice: how to customization tone of dialing? gasolin has demoed this work at COSCUP 2013

Slide 45

Slide 45 text

Gecko Gaia system comms Browser Settings ... email Gaia Overview

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

Tip: use inspector to know where you are

Slide 48

Slide 48 text

after found the app... Which script we should trace in?

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

KeypadManager.keyHandler()

Slide 51

Slide 51 text

https://wiki.mozilla.org/Audio_Data_API

Slide 52

Slide 52 text

HTML 5 Audio API

Slide 53

Slide 53 text

TonePlayer Audio() KeypadManager.keyHandler()

Slide 54

Slide 54 text

Okay, let's find the cool tones for dialing :-) http://zhusee2.github.io/bumbler-to-speech/

Slide 55

Slide 55 text

copy into gaia

Slide 56

Slide 56 text

Modify Source Code

Slide 57

Slide 57 text

Try it on browser and device! LOL

Slide 58

Slide 58 text

Contribution

Slide 59

Slide 59 text

+