7 Replies Latest reply on Jul 19, 2016 3:43 AM by Pietro Francesco Maggi

    Attempt to change the display's "Touch Mode" by MX/EMDK TouchMgr crashes on TC75

    9ee6e931-c37a-4cfb-b1d3-c8c319072c6e

      In our application on TC75 we want to set the display's Touch Mode to "Stylus and Finger" or "Glove and Finger" depending on the requests by of our the customers.

      Our application calls the EMDK API function this.emdkProfileManager.processProfile with this XML string as parameter:

       

      String[] profileParamString=new String[1];

       

      profileParamString[0]=

         "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
         +"<characteristic type=\"Profile\">"
         +"<parm name=\"ProfileName\" value=\""+profileName+"\"/>"
         +"<characteristic type=\"TouchMgr\">"
         +"<parm name=\"TouchAction\" value=\""+((mode==0)?("Stylus and Finger"):("Glove and Finger"))+"\"/>"
         +"</characteristic>"
         +"</characteristic>";

       

      But on my TC75 this immediately generates some severe problems on Linux device level (mouse and touchscreen) and with the MxStatsCSPService service:

       

      07-13 12:57:01.290 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxProfile = <?xml version="1.0" encoding="UTF-8"?><wap-provisioningdoc><characteristic type="TouchMgr" version=""><parm name="TouchAction" value="Stylus and Finger"/></characteristic></wap-provisioningdoc>

      07-13 12:57:01.290 2270-2270/? I/MxStats: MxFrameworkHelper:  mContextFrameworkService=android.app.Application@41918968

      07-13 12:57:01.290 2270-2270/? W/ContextImpl: Implicit intents with startService are not safe: Intent { act=com.symbol.osx.proxyframework.IMultiUserManager } android.content.ContextWrapper.bindService:517 com.symbol.mxmf.csp.stats.ConnectToService.bindProxyServices:59 com.symbol.mxmf.csp.stats.MxStatsCSPService.onCreate:128

      07-13 12:57:01.300 2503-2514/? D/TouchMngrCSPService: ITouchModeService.class.getName() = com.android.settings.touch.ITouchModeService

      07-13 12:57:01.300 2503-2514/? W/ContextImpl: Implicit intents with startService are not safe: Intent { act=com.android.settings.touch.ITouchModeService } android.content.ContextWrapper.bindService:517 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService.doBindService:464 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService.access$3:457

      07-13 12:57:01.300 2503-2514/? D/TouchModeService: Set To Stylus and Finger using: persist.sys.touch_mode flag

      07-13 12:57:01.300 2503-2514/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1616 android.content.ContextWrapper.bindService:517 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService.doBindService:464 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService.access$3:457 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService$2.processXML:284

      07-13 12:57:01.300 810-1207/? W/ActivityManager: Unable to start service Intent { act=com.android.settings.touch.ITouchModeService } U=0: not found

      07-13 12:57:01.340 810-919/? I/EventHub: Removing device '/dev/input/mouse0' due to inotify event

      07-13 12:57:01.340 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxResponse = <wap-provisioningdoc><characteristic type="TouchMgr" version="4.2"><parm name="TouchAction" value="Stylus and Finger"/></characteristic></wap-provisioningdoc>

      07-13 12:57:01.340 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - barcodePresent = false

      07-13 12:57:01.340 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - barcodePresentInCriteria = true

      07-13 12:57:01.340 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxPresent = true

      07-13 12:57:01.340 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxPresentInCriteria = true

      07-13 12:57:01.340 2117-2127/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - Leaving

      07-13 12:57:01.340 2270-2270/? I/MxStatsCSPService: onServiceConnected

      07-13 12:57:01.340 2270-2270/? I/MxStatsCSPService: onServiceConnected: unbindService

      07-13 12:57:01.340 2270-2270/? I/MxStatsCSPService: onServiceConnected: stopSelf

      07-13 12:57:01.350 2101-2101/? D/TLmEZebraExecSettings: EMDK profile manager result CHECK_XML

      07-13 12:57:01.360 2270-2270/? I/MxStatsCSPService: onServiceConnected

      07-13 12:57:01.370 810-919/? I/EventHub: Removing device atmel_mxt_ts T100 touchscreen due to epoll hang-up event.

      07-13 12:57:01.370 810-919/? I/EventHub: Removed device: path=/dev/input/event1 name=atmel_mxt_ts T100 touchscreen id=15 fd=190 classes=0x15

      07-13 12:57:01.370 2270-2270/? I/MxStatsCSPService: onServiceConnected: unbindService

      07-13 12:57:01.370 2270-2270/? I/MxStatsCSPService: onServiceConnected: stopSelf

      07-13 12:57:01.420 810-919/? I/InputReader: Device removed: id=15, name='atmel_mxt_ts T100 touchscreen', sources=0x00005103

      07-13 12:57:01.420 810-919/? D/InputReader: Could not retrieve current multitouch slot index.  status=-1

      07-13 12:57:01.420 810-919/? I/EventHub: Removing device '/dev/input/event1' due to inotify event

       

      What is wrong with the XML string?

      How can we fix this problem?

       

      The very same application runs successfully on a TC55.

       

      Some details about my TC75:

       

      D/TLmEDeviceSystemInfo: Android version '4.4.3'

      D/TLmEDeviceSystemInfo: Boot loader 'B08-23257-D3'

      D/TLmEDeviceSystemInfo: Device 'TC75'

      /TLmEDeviceSystemInfo: Fingerprint 'Zebra/TC75/TC75:4.4.3/01-23257-K-14-04-00-MV/eng.us0h00.20151015.190943:user/release-keys'

      D/TLmEDeviceSystemInfo: Build Id '01-23257-K-14-04-00-MV'

      D/TLmEDeviceSystemInfo: Manufacturer 'Zebra Technologies'

      D/TLmEDeviceSystemInfo: Model 'TC75'

      D/TLmEDeviceSystemInfo: Product 'TC75'

      D/TLmEDeviceSystemInfo: Kernel version '3.4.0'

      D/TLmEDeviceSystemInfo: Phone serial number '15160522502103'

      D/TLmEDeviceSystemInfo: Phone ANDROID ID '4dbd6b81113caf89'

      D/TLmEDeviceSystemInfo: Phone type '1'

      D/TLmEDeviceSystemInfo: Phone device Id (IMEI) '354176060085537'

        • Re: Attemt to change the display's "Touch Mode" by MX/EMDK TouchMgr crashes on TC75
          Pietro Francesco Maggi

          Hi Richard,

          this works for me if I have a TouchMgr profile, with the same "profilename" you're referencing in the EMDKConfig.xml file included in the asset folder of the application

           

          ~Pietro

            • Re: Attemt to change the display's "Touch Mode" by MX/EMDK TouchMgr crashes on TC75
              9ee6e931-c37a-4cfb-b1d3-c8c319072c6e

              I tried our TLmE application on another TC75 unit and get the same error messages about removal of "mouse" and "touchscreen" devices:

               

              07-14 09:05:49.400 810-917/? I/EventHub: Removing device '/dev/input/mouse0' due to inotify event

              07-14 09:05:49.400 1137-1137/? D/TLmEZebraExecSettings: EMDK profile manager result CHECK_XML

              07-14 09:05:49.400 7527-7561/? I/TLmEDeviceSettings: IncomingHandler handleMessage 200

              07-14 09:05:49.400 7527-7561/? I/TLmEDeviceSettings: Service 200 executed successfully

              07-14 09:05:49.410 1414-1414/? I/MxStatsCSPService: onServiceConnected

              07-14 09:05:49.410 1414-1414/? I/MxStatsCSPService: onServiceConnected: unbindService

              07-14 09:05:49.410 1414-1414/? I/MxStatsCSPService: onServiceConnected: stopSelf

              07-14 09:05:49.410 218-1641/? E/gsiff_sp_and_ndk: I/sp_and_ndk_polling_task: Num Samples read = 2!

              07-14 09:05:49.410 218-1641/? E/os_kf: I/os_kf_filter_update: Unfiltered timeMs=102694979275, unFiltMeas=2259.000000, unFiltMeasUnc=0.000000

              07-14 09:05:49.410 218-1641/? E/gsiff_sp_com: I/sp_process_raw_sensor_data: GYRO_DATA (0.000000,0.000000,0.000043) samp num = 2, flag 0, read @ sns 102694977 ms, print @ sys 102694979 ms

              07-14 09:05:49.410 218-1641/? E/os_kf: I/os_kf_filter_update: Unfiltered timeMs=102694979336, unFiltMeas=2320.000000, unFiltMeasUnc=0.000000

              07-14 09:05:49.410 218-1641/? E/gsiff_sp_com: I/sp_process_raw_sensor_data: ACCEL_DATA (-0.038607,0.775871,10.450990) samp num = 2, flag 0, read @ sns 102694977 ms, print @ sys 102694979 ms

              07-14 09:05:49.430 1414-1414/? I/MxStatsCSPService: onServiceConnected

              07-14 09:05:49.430 1414-1414/? I/MxStatsCSPService: onServiceConnected: unbindService

              07-14 09:05:49.430 1414-1414/? I/MxStatsCSPService: onServiceConnected: stopSelf

              07-14 09:05:49.440 810-917/? I/EventHub: Removing device atmel_mxt_ts T100 touchscreen due to epoll hang-up event.

              07-14 09:05:49.440 810-917/? I/EventHub: Removed device: path=/dev/input/event1 name=atmel_mxt_ts T100 touchscreen id=11 fd=269 classes=0x15

              07-14 09:05:49.490 810-917/? I/InputReader: Device removed: id=11, name='atmel_mxt_ts T100 touchscreen', sources=0x00005103

              07-14 09:05:49.490 810-917/? D/InputReader: Could not retrieve current multitouch slot index.  status=-1

              07-14 09:05:49.490 810-917/? I/EventHub: Removing device '/dev/input/event1' due to inotify event

              07-14 09:05:49.490 810-916/? I/ActivityManager: Config changes=8 {1.0 ?mcc?mnc de_DE ldltr sw360dp w360dp h615dp 320dpi nrml long port -touch -keyb/v/h -nav/h s.8}

              07-14 09:05:49.510 218-1641/? E/gsiff_sp_and_ndk: I/sp_and_ndk_polling_task: Num Samples read = 2!

              07-14 09:05:49.510 218-1641/? E/os_kf: I/os_kf_filter_update: Unfiltered timeMs=102695079198, unFiltMeas=2289.000000, unFiltMeasUnc=0.000000

              07-14 09:05:49.510 218-1641/? E/gsiff_sp_com: I/sp_process_raw_sensor_data: GYRO_DATA (0.000000,0.000000,0.000043) samp num = 3, flag 0, read @ sns 102695076 ms, print @ sys 102695079 ms

              07-14 09:05:49.510 218-1641/? E/os_kf: I/os_kf_filter_update: Unfiltered timeMs=102695079259, unFiltMeas=2350.000000, unFiltMeasUnc=0.000000

              07-14 09:05:49.510 218-1641/? E/gsiff_sp_com: I/sp_process_raw_sensor_data: ACCEL_DATA (-0.036212,0.783054,10.447398) samp num = 3, flag 0, read @ sns 102695076 ms, print @ sys 102695079 ms

               

              This TC75 unit still has the old EMDK 4.0 runtime binaries with MX framework version 5.0.10 and EMDK service version 4.0.2.0.

              Seria

               

              The other TC75 unit already has the new EMDK 4.2 runtime binaries with MX framework version 5.2.1 and EMDK service version 4.2.3.0.

              So the problem is not depending on the installed MX version.

              • Re: Attemt to change the display's "Touch Mode" by MX/EMDK TouchMgr crashes on TC75
                9ee6e931-c37a-4cfb-b1d3-c8c319072c6e

                Hello Pietro.

                 

                There is a tutorial named "Specify Touch Mode using Mx Touch Manager".

                I would like to try to reproduce my problem with this tutorial application. But I can not find any place where to download this sample - either in source or as a ready-to-install binary.

                The tutorial is not included in the "Samples" ZIP files.

                 

                Can you - or someone else - please provide me with a link where I can download the compiled APK of this tutorial application?

                 

                Thanks a lot. Richard.

                  • Re: Attemt to change the display's "Touch Mode" by MX/EMDK TouchMgr crashes on TC75
                    Pietro Francesco Maggi

                    Hi Richard,

                    I think that the Tutorial you're talking about is this "Touch Mode Profile":

                    Specify Touch Mode using Mx Touch Manager - Zebra Technologies Techdocs 

                     

                    You're right that the source code for this tutorial is not available in the sample package.

                    However you can simply use one of the provided sample (like the one about setting the clock) and modify it to cover the TouchManager profile.

                     

                    You can find a small example that implement this here: GitHub - pfmaggi/touchcfg: Use EMDK Touch Manager to configure Zebra's Android devices to use "Stylus and Finger" or "Gl…

                     

                    One interesting note: updating the touch configuration it's seen by Android as a configuration change and your activity is destroyed and recreated (I've added some logging to the lifecycle callbacks to show this).

                     

                    Ciao

                    ~Pietro

                    1 of 1 people found this helpful
                      • Re: Attemt to change the display's "Touch Mode" by MX/EMDK TouchMgr crashes on TC75
                        9ee6e931-c37a-4cfb-b1d3-c8c319072c6e

                        Hello Pietro.

                         

                        Thank you very much for your reply and for the download link for the sample application.

                         

                        I compiled the sample application and ran it on my TC75.

                        I get very similar messages in the logcat regarding "mouse", "touchscreen" and "event" devices and MX/EMDK services:

                         

                                                                       --------- beginning of /dev/log/system

                        07-19 10:13:15.486 2424-2435/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1616 android.content.ContextWrapper.bindService:517 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService.doBindService:464 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService.access$3:457 com.symbol.mxmf.csp.touchmgr.TouchMngrCSPService$2.processXML:284

                        07-19 10:13:15.486 815-1112/? W/ActivityManager: Unable to start service Intent { act=com.android.settings.touch.ITouchModeService } U=0: not found

                        07-19 10:13:15.526 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxResponse = <wap-provisioningdoc><characteristic type="TouchMgr" version="4.2"><parm name="TouchAction" value="Glove and Finger"/></characteristic></wap-provisioningdoc>

                        07-19 10:13:15.526 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - barcodePresent = false

                        07-19 10:13:15.526 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - barcodePresentInCriteria = true

                        07-19 10:13:15.526 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxPresent = true

                        07-19 10:13:15.526 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - mxPresentInCriteria = true

                        07-19 10:13:15.526 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: createProfile - Leaving

                        07-19 10:13:15.536 815-922/? I/EventHub: Removing device '/dev/input/mouse0' due to inotify event

                        07-19 10:13:15.556 1971-1974/? D/dalvikvm: GC_CONCURRENT freed 1912K, 64% free 4151K/11224K, paused 3ms+3ms, total 23ms

                        07-19 10:13:15.556 1971-2406/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 9ms

                        07-19 10:13:15.556 2245-2245/? I/MxStatsCSPService: onServiceConnected

                        07-19 10:13:15.556 2245-2245/? I/MxStatsCSPService: onServiceConnected: unbindService

                        07-19 10:13:15.556 2245-2245/? I/MxStatsCSPService: onServiceConnected: stopSelf

                        07-19 10:13:15.586 2245-2245/? I/MxStatsCSPService: onServiceConnected

                        07-19 10:13:15.586 2245-2245/? I/MxStatsCSPService: onServiceConnected: unbindService

                        07-19 10:13:15.586 2245-2245/? I/MxStatsCSPService: onServiceConnected: stopSelf

                        07-19 10:13:15.596 815-922/? I/EventHub: Removing device atmel_mxt_ts T100 touchscreen due to epoll hang-up event.

                        07-19 10:13:15.596 815-922/? I/EventHub: Removed device: path=/dev/input/event1 name=atmel_mxt_ts T100 touchscreen id=28 fd=178 classes=0x15

                        07-19 10:13:15.656 815-922/? I/InputReader: Device removed: id=28, name='atmel_mxt_ts T100 touchscreen', sources=0x00005103

                        07-19 10:13:15.656 815-922/? D/InputReader: Could not retrieve current multitouch slot index.  status=-1

                        07-19 10:13:15.656 815-922/? I/EventHub: Removing device '/dev/input/event1' due to inotify event

                        07-19 10:13:15.656 815-921/? I/ActivityManager: Config changes=8 {1.0 ?mcc?mnc de_DE ldltr sw360dp w360dp h615dp 320dpi nrml long port -touch -keyb/v/h -nav/h s.42}

                        07-19 10:13:15.706 950-950/? V/PhoneStatusBar: configuration changed: {1.0 ?mcc?mnc de_DE ldltr sw360dp w360dp h615dp 320dpi nrml long port -touch -keyb/v/h -nav/h s.42}

                        07-19 10:13:15.716 950-950/? D/PhoneStatusBar: mSettingsPanelGravity = 55

                        07-19 10:13:15.726 1971-1971/? D/PFM SAMPLE APP -->: onPause

                        07-19 10:13:15.726 1971-1971/? D/PFM SAMPLE APP -->: onStop

                        07-19 10:13:15.726 1971-1971/? D/PFM SAMPLE APP -->: onDestroy

                        07-19 10:13:15.736 1987-2442/? D/com.symbol.emdk.emdkservice.MxServiceConnection: The connection to the MX Service is closed.!

                         

                        07-19 10:13:15.736 1971-1971/? D/com.symbol.emdk.EMDKServiceConnection: The connection to the EMDK Service was closed.!

                        07-19 10:13:15.736 1987-1987/? D/com.symbol.emdk.emdkservice.EMDKService: onUnbind

                        07-19 10:13:15.736 1987-1987/? D/com.symbol.emdk.emdkservice.EMDKService: The EMDKService was destroyed.

                        07-19 10:13:15.736 1987-1987/? D/EmdkService: supportedcradle is null

                        07-19 10:13:15.736 1987-1987/? D/EmdkService: supportedDiagnostic is null

                        07-19 10:13:15.736 1987-1987/? D/EmdkService: #EMDK-SVC# ProfileService::nfnUnInitialize()

                        07-19 10:13:15.787 1971-1971/? D/PFM SAMPLE APP -->: onCreate

                        07-19 10:13:15.787 1987-1987/? D/com.symbol.emdk.emdkservice.barcode.SvcScanEventCallback: SvcScanEventCallback::barcodeManager

                        07-19 10:13:15.787 1987-1987/? D/dd:BT:: SvcBluetoothScanner::registerConnectionNotification

                        07-19 10:13:15.787 1987-1987/? D/dd:BT:: SvcBluetoothScanner::unregisterConnectionNotification

                        07-19 10:13:15.787 1987-1987/? D/com.symbol.emdk.emdkservice.EMDKService: The EMDKService was created.

                        07-19 10:13:15.787 1987-1987/? D/com.symbol.emdk.emdkservice.EMDKService: The AIDLProfileService was binded.

                        07-19 10:13:15.787 1987-1987/? D/com.symbol.emdk.emdkservice.MxServiceConnection: Binding Mx srvice

                        07-19 10:13:15.787 1971-1971/? D/com.symbol.emdk.EMDKServiceConnection: The EMDK Service will be connected soon (asynchronus call)!

                        07-19 10:13:15.797 1971-1971/? D/PFM SAMPLE APP -->: onStart

                        07-19 10:13:15.797 1971-1971/? D/PFM SAMPLE APP -->: onResume

                        07-19 10:13:15.797 1987-1987/? D/com.symbol.emdk.emdkservice.ProfileService: getVersion - Entering

                        07-19 10:13:15.797 1987-1987/? D/com.symbol.emdk.emdkservice.ProfileService: getVersion - Leaving

                        07-19 10:13:15.797 1987-1987/? D/EmdkService: EMDK Version=4.2.3.0

                        07-19 10:13:15.797 1987-1987/? D/MxVersionHandler: MxVersionHandler Constructor

                        07-19 10:13:15.837 1971-1971/? E/HAL: hw_get_module_by_class path = /system/lib/hw/gralloc.msm8960.so

                        07-19 10:13:15.837 1971-1971/? D/com.symbol.emdk.EMDKServiceConnection: The EMDK Service is now connected!

                        07-19 10:13:15.837 1971-1971/? D/PFM SAMPLE APP -->: onOpened

                        07-19 10:13:15.837 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileService: initializeProfileService - starts

                        07-19 10:13:15.837 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: ProfileHandler - Entering

                        07-19 10:13:15.847 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileHandler: ProfileHandler - Leaving

                        07-19 10:13:15.847 1987-1997/? D/com.symbol.emdk.emdkservice.ProfileService: initializeProfileService - ends

                         

                        In fact switching Touch Mode is successful, but the sample application - like our TLmE application - seems to be destroyed and restarted again each time due to a "configuration change" on Android system level.

                        Because our application is automatically setting the Touch Mode to the requested mode at start-up, this leads to an endless loop of application restarts.

                         

                        Is there any way to query the current state of the Touch Mode, so we can avoid calling the MX API for Touch Mode if the requested mode is already active?