Top Banner
Many, many thanks to: Wistia McGraw Hill Education Proctor Cam
49
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WebRTC communication and wearable devices

Many,manythanksto:

WistiaMcGrawHillEducation

ProctorCam

Page 2: WebRTC communication and wearable devices

WebRTCand

WearableDevices

ProctorCam

Page 3: WebRTC communication and wearable devices

AboutMe@giorgionatili

• TechnicalLeaderandAgileCoach• Front-endDeveloper(testfirst!)• MobileDeveloper(HybridwithCordova,iOS,Android)• TechnologyEnthusiast• [email protected]

Page 4: WebRTC communication and wearable devices

What'sNext• IntelIOTRoadShow/Feb24/https://iotroadshow.intel.com/en/home• NoSQLNight#2/Mar05/http://www.meetup.com/bostonsoftware• MobileTea#4/Mar19/http://www.meetup.com/mobiletea• TelerikNext/May3/http://www.teleriknext.com

Page 5: WebRTC communication and wearable devices

Agenda• Technologiesoverview• TizenWearablevsAndroidWear• GettingstartedwithTizenWearable• WebRTCandhybriddevelopment• Howtomakeithappening(Cross-Walk)

Page 6: WebRTC communication and wearable devices

APowerfulMix

Page 7: WebRTC communication and wearable devices

TechnolgoiesOverview

• TizenWearable• Android• Cordova• Cross-Walk• PhoneRTC

Page 8: WebRTC communication and wearable devices

Tizen• OperatingsystembasedupontheLinuxkernel• Itrunsonmobilephones(SamsungZ),wearabledevices(GearS2)andvehicles(IA32andARM)• CompletelyOpenSource• MailysuportedbySamsung,Intel,OrangeSA,etc.

Page 9: WebRTC communication and wearable devices

Android• OperatingsystembasedupontheLinuxkernel• Oneofthemostwidetargetoperatingsystem(mobile,wearable,car,tv,etc.)• AcompletelyOpenSourceplatform• Highlycustomizable(e.g.Cyanogen)

Page 10: WebRTC communication and wearable devices

ApacheCordova• Hybridmobiledevelopmentframework• Startedfromthedevelopmentcommunity• ExtendsthedeviceWebViewcapabilities• Baseduponapluginandcallbacksarchitecture• OpenSource

Page 11: WebRTC communication and wearable devices

Cross-Walk• Runtimetodeploywebbasedapplications• Supportmultiplearchitectures• ProvideamoreconsistentWebView(Android>4.xandTizencommonandIVIonly)• OpenSource• EnableChromiumfeaturesonmobiledevices

Page 12: WebRTC communication and wearable devices

PhoneRTC• CrossplatformWebRTCimplementation(Android/iOS/Web)• HighlyintegratedwithApacheCordova• OpenSource• Welldocumentedhttps://github.com/alongubkin/phonertc/wiki

Page 13: WebRTC communication and wearable devices

TizenVSAndroidWear

• Connectivity:bothoperatingsystemssupporttheBluetooth4.0• Programminglanguages:JavavsHTML5• SDKs:bothprovideasolidSDKbuttheTizenoneoffersmoretools• Appmodes:Tizensupportsstandaloneapps(integratedandlinkedaresupportedbyboth)

Page 14: WebRTC communication and wearable devices

TizenWearableSDK

Page 15: WebRTC communication and wearable devices

SDKOverview• Devicemanager• EclipseBasedIDE• SDB(SmartDevelopmentBridge)• Emulator• CLI(CommandLineInterface)Tool• Wearableframework• HTML/JavaScript/CSSwebframework(TAU)

Page 16: WebRTC communication and wearable devices

WearableFramework

• Contextmanagersupport• SamsungAccessoryProtocolstacksupport• Interoperabilitysupportviahostmanager(Phoneside)andwearablemanagerservice

Page 17: WebRTC communication and wearable devices

WebFramework• ProvidesacompleteimplementationoftheWebAPIoptimizedforwearabledevices• W3CWidgetspecificationssupport• DeviceAPIstoaccesstoadevice’splatformcapabilitiessupport• CameraAPIsupport• WebUIframework• Clockwidgetsupport

Page 18: WebRTC communication and wearable devices

ApplicationModels• Linked(Master-Follower)• Integrated• Standalone

Page 19: WebRTC communication and wearable devices

SmartDevelopmentBridge

It’satooltomanagetodevices/emulatorsthatforinstanceallowyoutocopyfiles,installapps,etc.,betweenthesupportedcommandsthemorenoticeableare

$sdbkill-server-killtheserverifitisrunning$sdbstart-server-ensurethatthereisaserverrunning$sdbpull<remote>[<local>]-copyfile/dirfromdevice$sdbpush<local><remote>-copyfile/dirtodevice

Page 20: WebRTC communication and wearable devices

DevelopmentSetup

YouneedyourAndroidSDKupandrunning,youwillusealottheADB

• DownloadtheTizenWearableSDKManagerandlaunchit• Addtoyourpaththetizen-wearable-sdk/tools/ide/binandtizen-wearable-sdk/tools/folders• LaunchtheIDEandcreateasampleproject• Openthedevicemanager,createanewvirtualmachineanddebugtheapp

Page 21: WebRTC communication and wearable devices

QuickDemo

Page 22: WebRTC communication and wearable devices

ConnectingtoDevice

InordertoconnectawidgetandadeviceyouhavefirstofalltodownloadthissourcecodefromtheSamsungwebsite(Applications_for_Emulator.zip)thenfollowthissteps

• ConnectthetargetdevicetotheUSB• Installthefollowingapps(exactorder)

Page 23: WebRTC communication and wearable devices

QuickDemo(fingercrossed!)

Page 24: WebRTC communication and wearable devices

Cordova

Page 25: WebRTC communication and wearable devices

CommandLine(cli)It'sannpmmodulethatactsasawrapperaroundthedifferentsupportedplatforms,themostimportantcommandsare:

$cordova<PATH>[ID[NAME]]-createanewproject$cordovaplatform[add|remove|update][platform]-add/remove/updateaplatform$cordovaplugin[add|remove|update][plugin]-add/remove/updateaplugin$cordovaprepare[platform]-movetheasssetstoaplatformprojects$cordovabuild[platform]-buildaspecificplatform$cordovarun[platform]-runtheprojectinatargetplatform$cordovaserve-runtheprojectinalocalwebserver

Page 26: WebRTC communication and wearable devices

CordovaandEclipse• OnceyouaddtheAndroidplatformandbuildtheprojectyoucanimportinEclipse• SinceCordova3.3somethinggoeswrongreferencingtotheembeddedCordovaLibproject• Referencethesourcecode(discouraged)orbuildCordova(stronglysuggested)

Page 27: WebRTC communication and wearable devices

CompileCordovaAndroid

• Clonetheandroid-cordovarepository• Switchtothe3.5tag(istheonlyonecanrunalsowitholderversionsofAndroid)• Movetotheframeworkfolder• UpdatetheprojectconfigurationfilestothedesiredSDKandcreatetheJAR

Page 28: WebRTC communication and wearable devices

EnablingWebRTCIt'senoughtoinstalltheplugininyourproject,youcaninstallitfromalocalfolderorusingthegitrepo(andoptionallyatag)

$cordovapluginaddhttps://github.com/alongubkin/phonertc.git

Page 29: WebRTC communication and wearable devices

CreateaWebRTCProject

• CreateaCordovaprojectandaddtheAndroidplatform• DownloadthesourcecodeofthePhoneRTCdemo(availableonGitHub)• Copytheclientfilesintothewwwfolder• Installtheserverfilesonanode.jsenvironment• Changeinsignaling.jstheconnectionaddress(ipordomain)

Page 30: WebRTC communication and wearable devices

QuickDemo

Page 31: WebRTC communication and wearable devices

Recap

Page 32: WebRTC communication and wearable devices

Step1InstalltheTizenWearableSDKanddefineavritualdevice

Page 33: WebRTC communication and wearable devices

Step2ConfigureaSAPserveronyourdeviceinordertotestthe

connectivity

Page 34: WebRTC communication and wearable devices

Step3ImporttheHelloAccessoryProviderprojectinEclipseandbuildit(just

tobesureyourconfigurationisOK)

Page 35: WebRTC communication and wearable devices

Step4ImportyourWebRTCCordovaprojectinEclipse(don'tbuildit,itwill

fail)

Page 36: WebRTC communication and wearable devices

Step5BuildandlinkCordovatoyourproject(don'tforgettomatchyour

targetAPI)

Page 37: WebRTC communication and wearable devices

Step6BuildtheCordovaprojecttoverifyeverythingiscorrectlyconfigured

Page 38: WebRTC communication and wearable devices

Step7StarttheintegrationoftheHelloAccessoryProviderprojectwiththe

Cordovaone

Page 39: WebRTC communication and wearable devices

Step8BuildaTizenWearablewidgetandconnectittoyourCordovaapp

Page 40: WebRTC communication and wearable devices

What'sNextFollowthisrepohttps://github.com/GiorgioNatili/tizen-werbrtc

Page 41: WebRTC communication and wearable devices

Resources

Page 42: WebRTC communication and wearable devices

UsefulLinks• http://denvycom.com/blog/step-by-step-guide-to-build-your-first-samsung-gear2-app-tizen• http://developer.samsung.com/galaxy#accessory• https://crosswalk-project.org/documentation/tizen_ivi_extensions.html• https://wiki.tizen.org/wiki/Tizen_IVI_SDK#Installing_Tizen_IVI_SDK• https://developer.tizen.org/dev-guide/2.3.0• http://denvycom.com/blog/how-to-install-wgt-files-gear2• http://java.dzone.com/articles/cordova-hello-world-android

Page 43: WebRTC communication and wearable devices

@giorgionatili#mobiletea#javascript#swift#wearable#agile#android#tdd

Thanks!

Page 44: WebRTC communication and wearable devices

Thanks!Grazie!Graçias!Danke!Merci!��!

artanimatedGIF

Page 45: WebRTC communication and wearable devices

Cross-Walk

Page 46: WebRTC communication and wearable devices

Why

Page 47: WebRTC communication and wearable devices

GettingStarted

Page 48: WebRTC communication and wearable devices

CordovaIntegration

Page 49: WebRTC communication and wearable devices

TroubleShooting