Xamarin Introduction, Sensors and iBeacon

51
Liddle Fang 2016 / 12 Xamarin iBeacon LBS

Transcript of Xamarin Introduction, Sensors and iBeacon

Liddle Fang2016 / 12

XamariniBeacon 與 LBS

2

Xamarin

3個人介紹

■ 房懷安, Liddle Fang

■ 半路出家,2003年開始寫程式。偏愛 .NET, Objective-C and Python

■ 2008 開始進入行動開發領域■ Github

https://github.com/FangHuaiAn■ 目前是昕力資訊產品暨顧問服務處資深顧問

4課程綱要

n 三大趨勢n 先進人工介面與 Sensorn Bluetooth, Satellite Guide and Map

5三大趨勢

n 高性能運算n A.I.n 先進介面

6高性能運算

7高性能運算

8A.I.

n 人腦神經元數目 860 億個。https://zh.wikipedia.org/wiki/神經元

n 電腦的核心數目,預估 2017 年抵達這個數目。

9A.I.

10核融合

n EAST : 2016 穩態運行電漿體

11我們知道接下來會是新世界!

n 那我們的定位在哪裡?

12先進人工介面與感測器

n 與實體人類的溝通問題n 狀態覺知 Situation awareness

13五感 – 與環境的互動與溝通

n 視覺n 聽覺n 嗅覺n 味覺n 觸覺

14視覺

n VRn ARn MR

n Computer Vision

15猜猜是什麼時候的書

16進場時機和價錢是重要的

n VR

17進場時機和價錢是重要的

n MR

18MR

n 整合視覺,建立 Situation Awareness

19MR

n 整合視覺,建立 Situation Awareness

20MR

21為什麼我們要注意國防科技

n 國防科技會是民用科技的先行者n 出得起錢!能忍受一些問題

22進場時機和價錢是重要的

n Price is Very Very Very Important !

USD$2000 USD$500

23聽覺

n Audio

n Microphone

24觸覺

n 不用懷疑,我們可能很快面對這個問題

25還有兩個

n 嗅覺?n 味覺?

26嗅覺

n CO2

n Gas

27味覺

n PH

28硬體環境

n Mac 電腦右圖是 Google I/O 2016 大會上的常見景象。講師使用MacBook Pro

29合法的 Windows 串接開發

n Xamarin Mac Agent SSH 連線至 Mac

30Environment - Hardware

n Android Phone 推薦 Google Nexus 系列

最新的 SDK 中規中矩的硬體規格

n Samsung 小改n 小米 大改n iPhone

任何一款 Apple 「現在」有賣的都行

31RTOS

n Real-time operation systemn Interrupt, Context Switchn Call 110, Call 119

32LLVM

n IR

33LLVM

34Dalvik

n JIT vs. AOTn Bytecoden .dex

35NDK Application

36NDK and SDK

37Sensors and Peripheral Devices

n 狀態Accelerometer 加速度計,Magnetometer 磁力計,Gyroscope 陀螺儀 ,Proximity Sensor 接近感測,Vibration 震動感測。

n 位置 ( Position : GPS, GLONASS, Galileo and Beidou )n 通訊 ( NFC, Bluetooth, Wi-Fi )n Vision (camera)n Audio ( speaker, audio-in, audio-out)

38Bluetooth 4

n Bluetooth Smartn Bluetooth Low Energy

39

通訊與定位

40定位

n 基於位置的服務

41通訊

n 廣播n 交流

42BLE 4.x

n UUID : 裝置的識別項n Service Id :裝置提供那些服務n Characteristic : 服務內提供那些特性可以提供

43iOS 和 Android 的 API 設計

n 從晶片的角度n 從 BLE protocol 的角度

44API 工作

n 搜尋裝置n 建立連結

n 取得狀態n 傳輸資料

45Xamarin.iOS

n CBCentralManagerDelegate

搜尋裝置建立連結

n CBPeripheralDelegate

取得狀態傳輸資料

46Xamarin.Android

n Android.Bluetooth.BluetoothAdapter

搜尋裝置建立連結

n Android.Bluetooth.BluetoothGattCallback

取得狀態傳輸資料

47Beacon

48iBeacon

n 自定義 Broadcasting Data

49

n 訊號強度n 三角函數

n Identity

50上一層

n Geofencen Proximity Detection

51

Demo

https://github.com/FangHuaiAn/XamarinTaichung20161211