EEP RWDAPP Mobile Mobile Wizard Mobile Wizard Mobile
EEP RWDAPP 教學講義
Mobile 基礎開發 • • Mobile 單檔Wizard開發 Mobile 多檔Wizard開發 Mobile預設�開發 Mobile檢驗開發
Mobile 單檔Wizard開發 • Mobile Wizard新增一個RWD Form表單 • 使用RWDSingle 1為Template開發客戶管理
Mobile 多檔Wizard開發 • Mobile Wizard新增一個RWD Form表單 • 使用RWDMaster. Detail 1為Template開發訂單管理
Mobile預設�開發 <script> function Get. Address() { return '台北市'; } </script> 1. 添加Order. Date這個欄位,將Default. Value屬性設定為_today,表示預設為今天日期 2. Ship. Address,Default. Method輸入Get. Address,並將Remote. Method設定為false,表示這個預設值 需要通過使用js的方法取得 3. 若設定Remote. Method為true,則表示通過一個C#的程式方法來實現(不建議,無法在APP使用)
Mobile檢驗開發 function Check. City(val) { if (val == "台北市" || val == " 新北市") { return true; } return false; } 設定 RWDValidate元件 添加一個Ship. City欄位,Check. Method屬性設為Check. City,這裡我們使用的是JS方法, 所以搭配Remote. Method屬性為False
• • • Mobile 元件應用 Selects Ref. Val(Column. Match、Where. Items) Date Radio. Button Check. Box Slider Image上傳與顯示 檔案上傳 Google map Mobile QRCode顯示
Selects • Select (Country)
Ref. Val • Refval(City) • Column. Match • Where. Items
Date • Date(Last. Ordered. Date)
Radio. Button • Radio. Button(Region)
Check. Box • checkboxes(Region)
Slider • Slider(Postal. Code)
Image上傳與顯示 • File(Picture) • Filter設置為jpg • Upload. Folder設置為Image • 顯示欄位將Format設置為 Image, Folder: Image, Height: 60
檔案上傳 • File(Attachment) • Filter設置為txt • Upload. Folder設置為Files • 顯示欄位將Format設置為 download, folder: Files
Google map • map(Google. Map) • JQScript. Manager的Use. Map 設定為true • 顯示欄位將Format設置為 Map, height: 100
Mobile QRCode顯示 • qrcode(QRCode) • 顯示欄位將Format設置為 qrcode, size: 60
Android開發環境說明(二) 目前Cordova版本,需要搭配Java 1. 8,否則RWDAPP建置時會出現類似訊息 JAVA_HOME=C: Program FilesJavajdk 1. 8. 0_112 MSBUILD : cordova-build error : Requirements check failed for JDK 1. 8 or greater JDK下載網址 http: //www. oracle. com/technetwork/javase/downloads/jdk 8 -downloads-2133151. html 通常是下載jdk-8 u 161 -windows-x 64. exe
Android開發環境說明(四) 安裝新版的Android SDK,需勾選同意條款,否則建置RWD APP時會出現類似訊息 A problem occurred configuring root project 'android'. You have not accepted the license agreements of the following SDK components: [Android SDK Platform 24]. 事後補救方法,透過指令方式輸入: C: Program Files (x 86)Androidandroid-sdktools android update sdk --no-ui --filter build-tools-24. 0. 0, android-24, extra-android-m 2 repository
Android開發環境說明(五) Cordova建置時還會出現一個錯誤訊息 MSBUILD : cordova-build error : [SDK Patch Applier v 4, Google Repository]. 1> [SDK Patch Applier v 4, Google Repository]. 請透過Android SDK Manager安裝
Mobile App 說明(Cordova)
Mobile App 專案目錄說明 • Plugin包含App所需的外掛程式資源 • WWW為Mobile網站內容(html, js, css) • RWDAPPwwwbootstrapjsinfolightbootstrap. infolight. s hare. js,第一行改為自己的實體JQ網站路徑 • Config. xml設定App的套件名稱、Cordova版本、插件功 能、版本號。可直接編輯文字檔
Mobile App 專案建立 • 透過EEP精靈,勾選Create EEP Solution,勾選j. Query, 建立一方案。 • 方案總管加入現有專案,選擇RWDAPP方案 • 將RWDAPP設定為起始專案 • web. config的appsettings增加下列key,匯出到Cordova 時的登入帳號 • MAP KEY請自行申請 <add key="Agent. User" value="001" /> <add key="Agent. Developer" value="" /> <add key="Agent. Database" value="ERPS" /> <add key="Agent. Solution" value="TEST" /> <add key="MAP_TYPE" value="google" /> <add key="MAP_KEY" value="AIza. Sy. AUx. CEIoh 6 p. Kx 5 Hpxx. VBYjd. NEm. Hm. TM 4 u 00" />
Mobile App 轉換 • 透過EEP精靈,勾選Export. To Cordova
Capture拍照 • Capture(Photo) • 設定上傳檔案大小 File. Size. Limited屬性 • 上傳目錄Upload. Folder 設定為upload_files • 顯示欄位將Format設置為 Image, Folder: upload_files, Height: 60
Client 端Push推撥 • Push推播功能 拖入一個JQMsg. Push元件,設定要傳送的人 和推播主旨、訊息。 (執行User. Devices檔案中的SQL) function Push() { $('#Push元件Id'). msg. Push('send'); } 訊息存在系統資料表SYS_MESSENGER中 推播Key放在RWDAPP/eep. App. xml
Server端 Push推撥 原始檔 jq. Webclient/handler/Push. Handler. ashx Android/i. OS/自行增加第三方推播 使用方式:
GEO地理位置 • geolocation(Address) 1. 在data. Form. Master上找到Address欄位 2. Editor下拉選擇geolocation。 , 3. 打開編輯畫面 會自動帶入 所在位置的經緯度到元件上。 地圖類型與MAP API Key放在web. config Convert. To. Cordova時會將key�寫入個別網頁 申請Google Map API key https: //developers. google. com/maps/documentation/geocoding/get-api-key? hl=zh-tw
Place打卡 • place(Address) • • • 在data. Form. Master上找到Address欄位 Editor下拉選擇place。 Editor. Options屬性, Geo. Format下拉選擇Geo會存座標; 下拉選擇String會存地點名。 可在RIPPLE模擬器中填入以下經緯度 25. 056799646937908 121. 51269972323017
Signature簽名 • Signature(Sign) • • 設定data. Grid. View裡 Sign欄位的Format屬性: Signature, height: 60, format: image Script. Manager設定 Use. Signature為True 增加欄位SQL ALTER TABLE CUSTOMERS ADD Sign NTEXT NULL
Q & A
- Slides: 46