8 Replies Latest reply on Nov 1, 2018 1:40 PM by Craig Allen

    EMDK 6.3 in Android Studio 3.1--How to Integrate

    Craig Allen

      I am trying to integrate EMDK 6.3 into my project in Android Studio 3.1 on Windows 10. (6.3 is necessary in order to support Android 5.1 on a CC5000.)

       

      -- I have downloaded and run EMDK-A-0603037.exe from the Zebra site..

      -- It created "Symbol EMDK for Android" in Program Files (x86).

      -- There is a checked entry for EMDK for Android in File-Settings-Plugins. Details show it is Version 6.3.2

       

      But the EMDK menu in AS only shows a null pointer error when I click on either entry (Profile Manager, About). And when I add "implementation 'com.symbol.emdk:6.3'" (and 6.3.2) to my build.gradle file it tells me Could not find com.symbol:emdk:6.3 (and 6.3.2) and tells me it searched my AppData/Local/Android/Sdk/extras/ folder structure to find the .jar and .pom files without success.

       

      In order to try to correct this situation:

      • I tried to apply the directions specified in Using Android Studio 3.0 With EMDK For Android as closely as I could given the variations in file structure between the beta version of the documentation and AS 3.1 in production. I do see EMDK APIs, Android 22, rev 623 checked in the SDK Platforms list in AS.
      • I also ran Integrator -install from the command line (as specified by the message that comes up when activated in the GUI) which told me the two paths were "Not installed!". When I chose to configure again, I get a message saying "Android Studio has been integrated with EMDK for Android successfully", but I have not seen it. The problems persist.

       

      Note that, as an experiment, I have also tried to install EMDK 7.0 in my environment, also without success. I am of the understanding, however, that 6.3 is the latest version that fully supports Lollipop.

       

      Advice?

        • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
          Darryn Campbell

          Hi, I'm not sure that EMDK supports the CC5000 device and it is not listed under any of the about pages for 'Devices Supported': About EMDK For Android - Zebra Technologies TechDocs

           

          Please see the support page and specifically the product reference guide which states to use DataWedge for data capture.  More information about DataWedge is available on our techdocs site

            • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
              Craig Allen

              It is listed here: EMDK for Android Support & Downloads | Zebra . The device show MSMF version 6.2.1.0 on it, so (I have been told) EMDK is on the device.

               

              I am using DataWedge to capture scans. I am interested in the EMDK to control/synchronize the device clock.

               

              But a larger question: even if EMDK is not supported on the device, shouldn't it still be accessible in my Android Studio dev environment?

                • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
                  Craig Allen

                  That is "The device shows MXMF version 6.2.1.0 on it..."

                    • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
                      Darryn Campbell

                      OK, assuming that device is supported, you should be able to run the 'set the clock' sample to quickly test if this would work: Setting The Clock - Zebra Technologies TechDocs

                       

                      To answer your larger question about getting EMDK working with Android Studio... you can't add "implementation 'com.symbol.emdk:6.3" in your build.gradle, please see WakeLock_WifiLock_Exerciser/build.gradle at master · darryncampbell/WakeLock_WifiLock_Exerciser · GitHub  for an example of how I used compileOnly to pick up the jar file from the add-ons folder (lines 30-33).  Make sure the "addon-symbol_emdk-symbol-XX" folders have been copied to the correct location.

                       

                      Regarding the null pointer error when you press Profile Manager --> About, this indicates the EMDK plugin was not successfully installed into Android Studio (step 5 in the instructions you originally linked to.), you could install the plugin from JetBrains since this would still be compatible with EMDK 6.6 (step 3 in these docs: EMDK Setup - Zebra Technologies Techdocs )

                        • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
                          Craig Allen

                          Thank you for the response. My progress so far:

                           

                          I used "compileOnly" per your reference and found that compilation succeeded. I also found the "EMDK APIs, Android 22, rev 623 (API 22)" option in the SDK Version list (which I don't think was there before) and, after some re-working, started successfully compiling the application with this setting, omitting some of the later-version libraries and their features.

                           

                          I also brought over the code from the Clock Setting sample and implemented it in the flow of my application. It, too, compiles successfully and have walked it through to make sure each element parsed correctly.

                           

                          However, I also pointed the EMDK plugin at com.symbol.emdk.wizard.intellijIdea.jar I found deep in my AppData/Local folder. This changed the plugin description so as to include an "Uninstall" button and added some links while still retaining the version that was originally there. (I also tried pointing at com.symbol.emdk.wizard.core.jar, found in the same folder, but this was rejected.) When I did this I found that the EMDK menu now says "Nothing here" rather than giving me the two inert menu options it did previously. Thus I cannot get the profiler to launch. So, when running the clock setting code, I have sending the XML to the parser by a string variable which, as I mentioned, parses correctly. But nothing happens--the clock is left unaltered.

                           

                          I assume the profiler does some magic that, once set, makes the device sensitive to the parsed settings out of the XML, because I am not seeing this happen. Any idea on how I might configure Android Studio to raise the profiler?

                            • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
                              Craig Allen

                              As a check, I also built and executed the sample Clock Setting program. The program runs successfully and shows a "Device Clock set successfully..." message after launch, but the clock is not affected.

                                • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
                                  Darryn Campbell

                                  So, if I understand correctly, there are 2 issues:

                                  1. The EMDK menu in Android Studio does not function correctly

                                  2. The clock sample did not successfully set the clock on the CC5000.

                                   

                                  For 1. Can you please uninstall the EMDK plugin completely and re-install the plugin from the online IntelliJ repo.  You can do this by following the instructions at step 3 of EMDK Setup - Zebra Technologies Techdocs

                                   

                                  For 2. I have emailed the product team to try and understand the level of support for EMDK on CC5000.  Can you please send me your built apk and I will try it on an alternative device - that way we can to some level isolate the device.

                                    • Re: EMDK 6.3 in Android Studio 3.1--How to Integrate
                                      Craig Allen

                                      There are two issues. I have resolved the second. There was an error in the XML file (caused by copying the sample) which was being swallowed and, thus, was undetectable. After correcting this error and some additional experimentation, I have managed to get the device to respond to the XML configuration settings. I am also now able to edit the settings before SET processing and, thus, am able to synchronize the device clock to a time signal, which was my goal.

                                       

                                      I am getting a CHECK_XML status (no further details) when doing the SET processing, but the device clock is still being set.

                                       

                                      The first issue remains. It would, of course, be ideal to resolve this as manual creation of the XML file is error-prone (my experience is an example).

                                       

                                      Again, much appreciation for the help thus far.