HelloPurr 靜宜大學服務學習發展中心、資管系 楊子青 2012.9.12.
智慧型手機市佔率
智慧型手機作業系統
主要的Android手機開發平台 Eclipse + Java程式語言
1. 初步使用MIT App Inventor 開啟Google Chrome瀏覽器 若需安裝,可連線: http://www.google.com.tw/chrome 進入MIT App Inventor官方網站,按Invent http://appinventor.mit.edu/ 用Gmail帳號登入 (或申請一個新帳號)
建立新專案
專案編輯畫面,按Learn
1.1 What is App Inventor Lets you develop applications for Android phones using a web browser and either a connected phone or emulator. The servers store your projects. The App Inventor Designer: select the components for app. The App Inventor Blocks Editor: assemble program blocks that specify how the components should behave
1.2 Setup: System requirements Computer and operating system Windows: Windows XP, Windows Vista, Windows 7 GNU/Linux: Ubuntu 8+, Debian 5+ Macintosh (with Intel processor): Mac OS X 10.5, 10.6 Browser Google Chrome 4.0 or higher Microsoft Internet Explorer 7 or higher Mozilla Firefox 3.6 or higher Apple Safari 5.0 or higher
1.3 Setup: Test your Java configuration Java下載:www.java.com . Test your Java configuration (1) Visit the Java test page . You should see a message that Java is working and that the version is Java SE 7 Update 07
Setup: Test your Java configuration (2) Run the AppInventor Java test by clicking on this link . This will check that your browser is properly configured to run Java, and that your computer can launch applications with Java Web Start.
1.4 Install the App Inventor Setup Software Before you can use App Inventor, you need to install a package called App Inventor Setup . Instructions for Windows AppInventor_Setup_Installer_v_1_2.exe (~92 MB) Instructions for GNU/Linux Instructions for Mac OS X
1.5 測試Open the Blocks Editor
2. Hello Purr! 加入Label元件,填入Text屬性
加入Button元件 Text屬性清為空白、Image屬性加入kitty.png
選Media群組,加入Sound元件 Source屬性加入meow.mp3
Save後,按Opening the Blocks Editor可決定 元件行為(編輯程式),選擇My Blocks頁籤
按Button1時(Click事件),播出聲音 (呼叫Sound1.Play)
按New Emulator開啟模擬器,滑蓋解鎖
按Connect to Device,選模擬器測試執行結果
3. 在手機進行測試: 先用USB線將手機連至電腦 有些手機需要先安裝相關手機同步軟體 例如HTC Sync.; Sony PC Companion
分享1:將APP程式下載至USB連線手機
分享2:將APP程式轉成apk檔
4. 手機特色1:讓手機震動(Sound1.Vibrate)0.5秒
手機特色2:搖晃手機 加入AccelerometerSensor元件
搖晃手機時(AccelerometerSensor.Shaking)即發聲