既然是安卓開發,首先我們要下載Android Studio.
接著是從SAP官網下載SAP Cloud Platform的Android開發SDK:
https://developers.sap.com/trials-downloads.html
https://developers.sap.com/topics/cloud-platform-sdk-for-android.html
Android SDK安裝完畢後,使用項目創建嚮導新建一個項目:
使用SAP Cloud Platform mobile service上已經創建好的應用:com.sap.wizapp:
這個com.sap.wizapp的配置在SAP Cloud Platform的mobile services頁面裡打開如下:
com.sap.edm.sampleservice.v2這個Destination提供了測試數據,包含product categories, product, supplier, customer和sales order等等。
完成項目創建嚮導。
SAP Cloud Platform Android SDK會自動給我們創建一個模板應用:
點擊Run按鈕啟動應用:
選擇在模擬器上運行:
點擊Get Started,進入用戶登錄頁面:
輸入SAP Cloud Platform的用戶名和密碼:
創建本地Passcode:
之後看到destination指向的OData服務的entity:
選擇Products,能看到產品列表:
選中某個產品,進入其明細頁面。