我在爲不同的Android手機測試構建在worklight中的應用程序時遇到問題。 我有nexus 4和samsung note2進行測試,應用程序在所有原生和jquery移動功能的nexus上都工作正常,但在三星note2的情況下,這些功能並不一致。事實上,大多數情況下,native和JQuery mobile功能在三星note2中都不起作用!我們無法跟蹤這個問題。Worklight 5.0.6 - 混合應用程序在不同Android手機中的意外行爲
不上三星注2工作,但在Nexus 4正常工作的jQuery Mobile的部分是:
<div id="Task_page" style="margin-top: -15px;">
<a href="#TaskManagerPopUp" data-rel="popup" data-position-to="window" data-transition="pop">click here</div>
<div data-role="popup" id="TaskManagerPopUp" class="bubble1" data-theme="d">
<a href="#popupMenusms" data-rel="popup" data-position-to="window"
data-transition="pop">for jquery function</a>
<a href="" onclick="call(9060606060)">call</a>
<a href="" onclick="locate("address is here")">navigate</a>
</div>
<div data-role="popup" id="popupMenusms" data-theme="d">
<label>heay this is 2nd popup</label>
</div>
</div>
第二彈出從未顯示了三星注2
本機部分是AA插件打開dailer和地圖導航。
- 插件的javascript包裝包含在主html文件中。
有一個全局函數來調用dailer和地圖導航。
//global function in main js file for dailer function call(phoneNmber){ window.plugins.phoneDialer.dial(phoneNmber); } //global function for navigator function locate(address){ showBusy(); var invocationData = { adapter: 'LatLang', procedure: 'getGmapLatLng', parameters: [address] }; WL.Client.invokeProcedure(invocationData, { onSuccess : onnavigateJobSuccess, onFailure : onnavigateJobFailed, timeout : 30000 }); } function onnavigateJobSuccess(result) { hideBusy(); if(result.invocationResult.isSuccessful) { userlat=result.invocationResult["lat"]; userlang=result.invocationResult["lng"]; cordova.require('cordova/plugin/phonenavigator').doNavigate(userlat, userlang, successnavigate, errornavigate); } } function onnavigateJobFailed(error){hideBusy();} function successnavigate(){} function errornavigate(){}
。
呼叫,並在第一個彈出式導航工作正常,在Nexus 4,但不會對三星注2
日誌從logcat的第二彈出IE-popupMenusms,它沒有顯示在NOTE2的工作:
01-28 12:53:15.717: D/GestureDetector(3603): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 4 mFalseSizeCnt:0
01-28 12:53:15.722: V/webview(3603): singleCursorHandlerTouchEvent -getEditableSupport FASLE
01-28 12:53:16.067: I/GATE(3603): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
01-28 12:53:16.067: D/Cordova(3603): onPageFinished(file:///data/data/com.FieldWork/files/www/default/FieldWork.html#&ui-state=dialog)
01-28 12:53:16.067: D/WebView(3603): loadUrlImpl: called
01-28 12:53:16.067: D/DroidGap(3603): onMessage(onNativeReady,null)
01-28 12:53:16.072: D/DroidGap(3603): onMessage(onPageFinished,file:///data/data/com.FieldWork/files/www/default/FieldWork.html#&ui-state=dialog)
01-28 12:53:16.092: D/webcore(3603): CORE loadUrl: called
01-28 12:53:17.707: D/GestureDetector(3603): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
01-28 12:53:17.717: I/GATE(3603): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
01-28 12:53:17.717: D/Cordova(3603): onPageFinished(file:///data/data/com.FieldWork/files/www/default/FieldWork.html)
01-28 12:53:17.722: D/WebView(3603): loadUrlImpl: called
01-28 12:53:17.722: D/DroidGap(3603): onMessage(onNativeReady,null)
01-28 12:53:17.722: D/DroidGap(3603): onMessage(onPageFinished,file:///data/data/com.FieldWork/files/www/default/FieldWork.html)
01-28 12:53:17.767: D/webcore(3603): CORE loadUrl: called
的dailer功能在一個地方工作給人的日誌:
01-28 13:12:46.305: D/GestureDetector(31954): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 10 mFalseSizeCnt:0
01-28 13:12:46.310: V/webview(31954): singleCursorHandlerTouchEvent -getEditableSupport FASLE
01-28 13:12:46.670: I/GATE(31954): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
01-28 13:12:46.670: D/Cordova(31954): onPageFinished(file:///data/data/com.FieldWork/files/www/default/FieldWork.html#&ui-state=dialog)
01-28 13:12:46.670: D/WebView(31954): loadUrlImpl: called
01-28 13:12:46.670: D/DroidGap(31954): onMessage(onNativeReady,null)
01-28 13:12:46.670: D/DroidGap(31954): onMessage(onPageFinished,file:///data/data/com.FieldWork/files/www/default/FieldWork.html#&ui-state=dialog)
01-28 13:12:46.775: D/webcore(31954): CORE loadUrl: called
01-28 13:12:47.725: D/GestureDetector(31954): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
01-28 13:12:47.730: V/webview(31954): singleCursorHandlerTouchEvent -getEditableSupport FASLE
01-28 13:12:48.045: D/FieldWork(31954): Dailers cordova.exec called with ::9854785633
01-28 13:12:48.115: D/DroidGap(31954): Paused the application!
01-28 13:12:48.115: D/CordovaWebView(31954): Handle the pause
01-28 13:12:48.120: D/WebView(31954): loadUrlImpl: called
01-28 13:12:48.130: I/GATE(31954): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
01-28 13:12:48.130: D/webcore(31954): CORE loadUrl: called
01-28 13:12:48.150: D/Cordova(31954): onPageFinished(file:///data/data/com.FieldWork/files/www/default/FieldWork.html)
01-28 13:12:48.150: D/WebView(31954): loadUrlImpl: called
01-28 13:12:48.155: D/DroidGap(31954): onMessage(onNativeReady,null)
01-28 13:12:48.155: D/DroidGap(31954): onMessage(onPageFinished,file:///data/data/com.FieldWork/files/www/default/FieldWork.html)
01-28 13:12:48.205: D/webcore(31954): CORE loadUrl: called
01-28 13:12:48.495: D/webviewglue(31954): OnTrimMemory with EGL Context 0x58a63c78
不工作時的dailer功能提供了日誌爲:
01-28 13:04:25.507: D/GestureDetector(26533): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 3 mFalseSizeCnt:0
01-28 13:04:25.517: V/webview(26533): singleCursorHandlerTouchEvent -getEditableSupport FASLE
01-28 13:04:25.862: I/GATE(26533): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
01-28 13:04:25.862: D/Cordova(26533): onPageFinished(file:///data/data/com.FieldWork/files/www/default/FieldWork.html#&ui-state=dialog)
01-28 13:04:25.862: D/WebView(26533): loadUrlImpl: called
01-28 13:04:25.867: D/DroidGap(26533): onMessage(onNativeReady,null)
01-28 13:04:25.867: D/DroidGap(26533): onMessage(onPageFinished,file:///data/data/com.FieldWork/files/www/default/FieldWork.html#&ui-state=dialog)
01-28 13:04:25.902: D/webcore(26533): CORE loadUrl: called
01-28 13:04:26.917: D/GestureDetector(26533): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
01-28 13:04:26.927: I/GATE(26533): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
01-28 13:04:26.927: D/Cordova(26533): onPageFinished(file:///data/data/com.FieldWork/files/www/default/FieldWork.html)
01-28 13:04:26.927: D/WebView(26533): loadUrlImpl: called
01-28 13:04:26.927: D/DroidGap(26533): onMessage(onNativeReady,null)
01-28 13:04:26.932: D/DroidGap(26533): onMessage(onPageFinished,file:///data/data/com.FieldWork/files/www/default/FieldWork.html)
01-28 13:04:26.932: D/webcore(26533): CORE loadUrl: called
heay伊詹亞達,我剛纔編輯我的問題。 –
在Note2中失敗時,您在LogCat中看到什麼? –
嘿,我已經添加了日誌:1.當第二個彈出窗口出現。當拖鞋工作正常時。 3.當dailer不工作時。導航功能也是如此。 –