SlideShare a Scribd company logo
1 of 58
Download to read offline
AppInventor(3)
講師:王瑋毅
AppInventor-接API資料
JSON是什麼?
• JSON全名叫做JavaScript Object Notation,就是在JavaScript之中,
表示物件的一種格式。
• JSON不是JavaScript的物件實字,JSON只是基於JavaScript的物件
實字。
• 在JSON只允許以雙引號(“”)包圍字串值。
• JSON的副檔名是 .json
JSON範例- ”名稱” : ”值”
{ 
“brand” : “Crocs”,
“color” : “pink”, 
“size” : 9, 
“hasLaces” : false, 
“title” : “This is the body." 
} 
新增需要的元件-Button、Label
新增需要的元件-Web
設定Web1的Url
• http://opendata.epa.gov.tw/ws/Data/UV/?$orderby=PublishAgency&
$skip=0&$top=1000&format=json
新增一個全域變數方塊-名為json
全域變數方塊設為空的list
設置取得Web1的文字事件
設置儲存的全域變數
使用Web1的解析Json方法
設置取得的Url
設置顯示的標籤
設置按鈕事件
設置按鈕按下呼叫Web1方法
執行結果
AppInventor-標準體重
題目
• 男性: (身高cm - 80) x 70% = 標準體重
• 女性: (身高cm - 70) x 60% = 標準體重
上傳兩張圖片
設置文字方塊
設置水平布局
設置按鈕1
設置按鈕2
設置標籤
設置圖片
設置按鈕1事件
設置按鈕1顯示文字標籤
設置按鈕1數學式(1/4)
設置按鈕1數學式(2/4)
設置按鈕1數學式(3/4)
設置按鈕1數學式(4/4)
設置按鈕1顯示圖片
設置按鈕1要顯示的圖片
設置按鈕2事件
設置按鈕2顯示文字標籤
設置按鈕2數學式(1/4)
設置按鈕2數學式(2/4)
設置按鈕2數學式(3/4)
設置按鈕2數學式(4/4)
設置按鈕2顯示圖片
設置按鈕2要顯示的圖片
執行結果
練習
• 標準體重正負10%為正常體重
設置按鈕1合併文字
設置按鈕1數學式(1/3)
設置按鈕1數學式(2/3)
設置按鈕1數學式(3/3)
新增按鈕1合併文字(1/2)
新增按鈕1合併文字(2/2)
新增按鈕1顯示文字
設置按鈕2合併文字
設置按鈕2數學式(1/3)
設置按鈕2數學式(2/3)
設置按鈕2數學式(3/3)
新增按鈕2合併文字
新增按鈕2顯示文字
執行結果

More Related Content

What's hot

Excel IF, IFs.ppt
Excel IF, IFs.pptExcel IF, IFs.ppt
Excel IF, IFs.ppt
EdwinAdeolaOluwasina1
 
R12 features presentation inventory management
R12 features presentation inventory managementR12 features presentation inventory management
R12 features presentation inventory management
Amine Gallah
 

What's hot (20)

Validate maximum expiration date for items lots
Validate maximum expiration date for items lotsValidate maximum expiration date for items lots
Validate maximum expiration date for items lots
 
코틀린 멀티플랫폼, 미지와의 조우
코틀린 멀티플랫폼, 미지와의 조우코틀린 멀티플랫폼, 미지와의 조우
코틀린 멀티플랫폼, 미지와의 조우
 
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰
- 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰
- 정시 퇴근을 위해 우리는 어떻게 해야할 것인가? Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰
- 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰
- 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
 
Run report from menu Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Run report from menu  Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...Run report from menu  Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Run report from menu Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
 
Shaping Up Theme Roller Beyond Universal Theme
Shaping Up Theme Roller Beyond Universal ThemeShaping Up Theme Roller Beyond Universal Theme
Shaping Up Theme Roller Beyond Universal Theme
 
BOM & WIP
BOM & WIPBOM & WIP
BOM & WIP
 
Kotlin - scope functions and collections
Kotlin - scope functions and collectionsKotlin - scope functions and collections
Kotlin - scope functions and collections
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Graphical User Interface in JAVA
Graphical User Interface in JAVAGraphical User Interface in JAVA
Graphical User Interface in JAVA
 
진화하는 디자인 시스템(걸음마 편)
진화하는 디자인 시스템(걸음마 편)진화하는 디자인 시스템(걸음마 편)
진화하는 디자인 시스템(걸음마 편)
 
Excel IF, IFs.ppt
Excel IF, IFs.pptExcel IF, IFs.ppt
Excel IF, IFs.ppt
 
Tweaking the interactive grid
Tweaking the interactive gridTweaking the interactive grid
Tweaking the interactive grid
 
Oracle EBS HRMS SETUP
Oracle EBS HRMS SETUPOracle EBS HRMS SETUP
Oracle EBS HRMS SETUP
 
Oracle EBS Purchasing Requisition Approval 101
Oracle EBS Purchasing Requisition Approval 101Oracle EBS Purchasing Requisition Approval 101
Oracle EBS Purchasing Requisition Approval 101
 
Personalization to restrict subinventory lov in interorganization transfer كي...
Personalization to restrict subinventory lov in interorganization transfer كي...Personalization to restrict subinventory lov in interorganization transfer كي...
Personalization to restrict subinventory lov in interorganization transfer كي...
 
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | EdurekaWhat is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android Development
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle apps
 
JSR 352 “Batch Applications for the Java Platform”
JSR 352 “Batch Applications for the Java Platform”JSR 352 “Batch Applications for the Java Platform”
JSR 352 “Batch Applications for the Java Platform”
 
R12 features presentation inventory management
R12 features presentation inventory managementR12 features presentation inventory management
R12 features presentation inventory management
 

Viewers also liked (8)

不同尺寸與解析度的螢幕下,Android 程式 UI 的設計與解決方式
不同尺寸與解析度的螢幕下,Android 程式 UI 的設計與解決方式不同尺寸與解析度的螢幕下,Android 程式 UI 的設計與解決方式
不同尺寸與解析度的螢幕下,Android 程式 UI 的設計與解決方式
 
App inventor 教學講義 chapter4
App inventor 教學講義 chapter4App inventor 教學講義 chapter4
App inventor 教學講義 chapter4
 
App inventor 教學講義 chapter6
App inventor 教學講義 chapter6App inventor 教學講義 chapter6
App inventor 教學講義 chapter6
 
Android 程式設計(1)
Android 程式設計(1)Android 程式設計(1)
Android 程式設計(1)
 
App inventor 4
App inventor 4App inventor 4
App inventor 4
 
Android 程式設計(2)
Android 程式設計(2)Android 程式設計(2)
Android 程式設計(2)
 
App inventor 2
App inventor 2App inventor 2
App inventor 2
 
App inventor 1
App inventor 1App inventor 1
App inventor 1
 

App inventor 3