Top Banner
Processing 互動媒體結合 Android智慧型手機研習營 CAVEDU Education,2013
18

Processing on your Android

Jan 21, 2018

Download

Devices & Hardware

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: Processing on your Android

Processing 互動媒體結合Android智慧型手機研習營

CAVEDU Education,2013

Page 3: Processing on your Android
Page 4: Processing on your Android

Android with Robot

Page 5: Processing on your Android

環境建置

• JDK

– 要設定環境變數

• Processing 2.0 (2.1先不要)– http://processing.org/download/?processing

• ADT Bundle (就是Eclipse + Android SDK)

– http://developer.android.com/sdk/index.html

– 請選擇 Use an existing ide後下載[installer_r22.3-windows.exe]

Page 6: Processing on your Android

設定環境變數• 對[我的電腦]點右鍵內容

進階系統設定選擇[環境變數]

• 在[系統變數]中:

1. 新增JAVA_HOME: JDK路徑。例如 [C:\Program Files\Java\jdk1.7.0]

2. 原有的Path: 新增JDK路徑

Page 7: Processing on your Android

Android ADT Bundle

• 整包下載好,解壓縮,執行SDK Manager安裝必要更新

• 就有Android 4.2可使用。

Page 8: Processing on your Android

SDK Manager

• 在此管理所有Android版本與相依套件

• 請額外下載Android 2.3.3

Page 9: Processing on your Android

AVD Manager

• 管理所有模擬器

• AVD是指 Android Virtual Machine,就是手機模擬器。

• 當沒有實體手機時,可用模擬器來執行(部分硬體功能會無法使用)

Page 10: Processing on your Android

新增模擬器

1. 點選New...

2. 設定AVD Name, Device(解析度,不用選太高,電腦會變慢),

3. Target 請選Android 2.3.3。設定好按OK。

4. 新增完成,AVD可自由編輯或刪除。

Page 11: Processing on your Android

開啟Processing

Page 12: Processing on your Android

新增模式

• 點選右上角的 [Java],再選擇 Add Mode…

• 找到 Android Mode,點選 Install

• 安裝完畢之後請重新啟動 Processing

Page 13: Processing on your Android

設定Processing中的Android SDK路徑

Page 14: Processing on your Android

切換到Android

Page 15: Processing on your Android

匯出成Android project / apk

• Android project 是後續在Eclipse中修改或是無法直接由Processing安裝時可這樣使用。

• apk 則是安裝黨

Page 16: Processing on your Android

執行 Device / Emulator

終於完成了!

Page 17: Processing on your Android

範例

• 手勢與多點觸碰

• 相機

• 感測器

– 位置感測器

– 加速度計

• Wifi連線功能

Page 18: Processing on your Android

參考資料

• 線上學Processing http://sketchpad.cc