2

I am having problems while testing an application built in worklight for different android phones. I have nexus 4 and samsung note2 for testing, application is working fine on nexus with all the native and jquery mobile features but in case of samsung note2, the features don't work consistently. In fact most of the times, both - native and JQuery mobile Functions don't work at all in samsung note2! and we are unable to track the problem.

The JQuery mobile part which does not work on Samsung note2 but works fine on nexus 4 is:

    <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>

The second popup never shows on Samsung Note2

The native part is a a plugin for opening the dailer and map navigation.

  1. The javascript wrapper of the plugin is included in the main html file.
  2. There is a global function to call the dailer and map navigation.

    //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(){}
    

in the navigation function i am taking the lattitude and longitude of destination and passing it to the cordova plugin.

Call and navigate in the first popup works fine on nexus 4 But does not work on Samsung Note2

1 The logs from logcat for the second popup i.e.-popupMenusms, which is not showing on NOTE2 are :

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

2 The dailer function working at one place gives the logs:

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

3 The dailer function when not working gives logs as:

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
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Sanket K.
  • 197
  • 12
  • heay Idan Adar, i have just edited my question. – Sanket K. Jan 23 '14 at 07:47
  • What do you see in LogCat when it fails in Note2? – Idan Adar Jan 24 '14 at 11:02
  • Heay i have added the logs: 1. when the second popup does come up. 2.when the dailer works all ok. 3. when the dailer does not work. Same is the case with the navigation function. – Sanket K. Jan 28 '14 at 08:33
  • logcat doesn't show any error but there are some difference between logs where The dialer function working at one place and not working at other place. but i am not able to get what the problem is. – Sanket K. Jan 28 '14 at 10:31
  • @Idan Adar I too have the same problem – Balaji Sabdhar M Feb 12 '14 at 19:30
  • Sorry to hear that, still can't help. Try creating a minimized test case instead of the full project. This will help to pin-point What is not working. – Idan Adar Feb 12 '14 at 19:31
  • I want to point to the previous discussion on developer works which I think is the same issue [This link](https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014939060&ps=25) – Sanket K. Mar 10 '14 at 13:04
  • @SanketK., looks like it; does the workaround works for you? if yes, please write that as an answer to this question – Idan Adar Mar 28 '14 at 12:05
  • @SanketK., were you able to resolve this problem? – Idan Adar May 09 '14 at 13:57
  • @Idan Adar., sorry for late reply. No, I still not able to resolve this problem. The problem is same that click event doesn't fire when I am using it in a popup. – Sanket K. Jun 11 '14 at 06:08

1 Answers1

1

As far I can recall, Samsung wrecked havoc in their support in some devices.
See if the following helps.

Where the following happens, try adding a listner to touchstart.
singleCursorHandlerTouchEvent -getEditableSupport False

phonegap + android Touch events Error singleCursorHandlerTouchEvent -getEditableSupport False
singleCursorHandlerTouchEvent -getEditableSupport FASLE bug

$('.element').on('touchstart', function(ev) {
   ev.preventDefault();
});
Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89