SAP OData offline store在Android平臺的技術實現
I am studying Kapsel OData offline plugin recently. In SAP help the source code of OData.js is provided:
The source code clearly conveys the idea documented in SAP help: “When an offline store is first opened, it synchronizes with the OData producer. OData requests made against this plugin use the available open offline stores.“.
And I am curious how this offline store is opened in the real application. So I use a CRM Fiori offline application to have a look.
(1) In offline project folder there is a config.xml, which defines the entry point for offline application access, the index.html file.
(2) Open this index.html, there is a script file “createStores.js”:
This file has constructed an object sap.smp.registration:
There is a public method setup exposed which accepts an array for offline store collection and call a private method _setupStore one by one. Once the asynchronous setup process is done successfully, callback success is called.
In implementation of _setupStore, the sap.OData.createOfflineStore(properties) and sap.OData.applyHttpClient() mentioned in sap help could be found.
(3) back to index.html, there is a file contentplace.js:
In this file, offline store will be opened in line 14, and application specific initialization is called in callback function defined in line 5.
(4) finally, the createContentPlaceFunction is called in index.html in line 196:
(5) Now check how OfflineStore open is implemented in Android platform via Java:
In line 215, offline store instance is created and a listener is registered, since open operation is done asynchronously:
And open operation is started here:
Check in ODataOfflineStore class, a new thread is created to perform open action:
In run method, the call is delegated back to ODataOfflineStore.openStoreSync:
The core open operation is done in this.store.open:
If open is done successfully, the listener registered in ODataOfflineStore instance will be notified with ODataOfflineStoreOpen state:
The core implementation of open method in Store class is implemented natively and could not be visible in Java stack:
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2724090/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在SAP雲平臺的CloudFoundry環境下消費ABAP On-Premise OData服務CloudREM
- SAP ABAP OData 服務的 $count 操作實現
- SAP NetWeaver整合化技術平臺解決方案
- SAP Gateway Service Builder 裡的 OData 服務實現方式GatewayUI
- 使用SAP雲平臺的destination消費Internet上的OData service
- Android平臺Airplay的實現方法AndroidAI
- SAP 業務技術平臺(BTP) 上的 Business Rules Service 使用介紹
- 在linux平臺實現atoslLinux
- SAP Emarsys 的前後臺技術棧
- SAP 業務技術平臺(BTP) Workflow(工作流)功能介紹
- 【轉帖】SAP NetWeaver整合化技術平臺解決方案
- 如何用 SAP BTP 平臺上的圖形建模器建立一個 OData 服務
- OData服務在SAP CRM,Cloud for Customer和S/4HANA上的實現比較Cloud
- 實時互動平臺流程與技術分析
- 構建實時資料整合平臺時,在技術選型上的考量點
- BAAS平臺_區塊鏈baas平臺技術_區塊鏈技術開發區塊鏈
- 實現在安卓平臺下的即時通訊安卓
- 移動平臺的技術演變
- 跨平臺技術演進
- Android技術棧(三)依賴注入技術的探討與實現Android依賴注入
- 基於Android平臺的RouterSDK設計與實現Android
- 元境雲遊戲技術讓遊戲全平臺暢玩成為現實遊戲
- 《巫師之昆特牌》登陸iOS平臺!現在就可在蘋果App Store下載!iOS蘋果APP
- 如何設計實時資料平臺(技術篇)
- 美團容器平臺架構及容器技術實踐架構
- 螞蟻集團技術風險程式碼化平臺實踐(MaaS)
- OpenCV在Android平臺上的應用OpenCVAndroid
- SAP 電商雲 Spartacus UI 實現的 ngrx-router-store.js 的 serializerUIJS
- 在 iOS 平臺實現Ping 和 tracerouteiOS
- 【轉載】SAP 系統中STO+VC 技術實現
- SAP OData效能分析工具
- C# 跨平臺UI 技術C#UI
- 微服務平臺技術架構微服務架構
- 論文第5章:Android繪圖平臺的實現Android繪圖
- 在 Python 中實現 COMET 技術Python
- 【聊技術】在Android中實現自適應文字大小顯示Android
- VMware Fusion Pro 13:強大虛擬化技術,實現高效多平臺相容
- 基於Android平臺實現人臉識別Android