7 Replies Latest reply on Feb 24, 2015 10:31 AM by Khai-Van Phu

    SB1 development toolkit v2.4 - asl.js uncompressed ?

    Khai-Van Phu

      Hi all,

       

      Development toolkit v2.4 for SB1 running image firmware v03.01.45 contains asj.js library in its minified version (no spaces, no carriage return...).

       

      This is a good thing for production use. The library will load faster and will consume less memory when displaying HTML pages.

       

      However asj.js in its minified version is not suitable for the developer when there is a need to debug apps or when we simply want to understand how the asl.js works.

       

      Development toolkit prior to v2.4 has asl.js in its normal format with spaces & lines break.

       

      Is it possible to have the uncompressed version v2.4 of asl.js?

       

       

      Thank you

       

      Khai-Van PHU

        • Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
          Siegmund Leducq

          Howdy,

           

          Not only do I agree wholeheartedly with K-V P, I even ran into trouble because of it. I tried to use the new asl.js from toolkit 2.4 and all of a sudden my apps stopped working. You can imagine it's hard to find the culprit in a minified file?

           

          Greets,

           

          Sig

            • Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
              Siegmund Leducq

              Looks like this forum (or community) isn't exactly as alive or responsive as one might hope for. Therefore, I continued my quest for the needed data solo. The results are meagre, though... all I found is contradicting info with regard to the asl.js file. In two separate, yet both Motorola, support articles I found the exact opposite when asked which asl file to use: the one in localhost/applications/www or the one you'd put in the src folder of the userdrive yourself...

              ANYone with an authoritative opinion around, willing to call it?

                • Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
                  Khai-Van Phu

                  Hi Siegmund,

                   

                  I am not sure to fully understand the question.

                  If you are asking yourself what asl.js file to use for your SB1's apps (local or remote), you can try the one found in Developer Toolbox v2.4.0 available for download on Motorola Solutions web site.

                  Capture2.JPG

                  Once the ZIP file extracted, asl.js is in folder \Software Development Toolkit v2.4\Assets and Libraries\UserDrive\apps\src\.

                   

                  Let me know if this is what you are asking for.

                   

                  Regards

                   

                   

                  Khai-Van PHU

                    • Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
                      Siegmund Leducq

                      Hmmm, I can imagine my posts were rather confusing. The actual questions are three:

                       

                      1) MINIFIED ISSUE: (just like you) I'd like to have a non-minified version of the asl.js file in DT2.4.0, for debugging purposes. Where can I find it?

                       

                      2) FILE CHOICE ISSUE: According to some (most even) posts on this forum, one should include the asl.js file from DT2.4.0 and reference that one. Straightforward enough.

                      Other posts, however, seem to advise using an asl.js file higher up in the hierarchy on the SB-1. (i.e. in localhost/applications/www, according to the posts I found)

                      This does make sense as well, since it would ensure that the device always uses a 'matched pair' (asl & device software) after machine software updates...

                      Anyhow, since anything higher up than the UserDrive is inaccessible (as far as I know) to us, simple mortals, I have no way of knowing which file (version) resides there, if at all.

                      Consequently, I do not know whether adding it yourself or rather using the 'hidden' one would be considered best practice?

                       

                      3) UPDATE COMPATIBILITY: For some reason, updating the device worked like a charm but when I tried referencing the corresponding asl.js file, my apps stopped working. As a result, I'm now running an old asl.js file on an updated device (which seems to work, most of the time) but I'm guessing that this is a suboptimal situation nonetheless... Anyone else run into this problem? Or better yet, discovered what caused the incompatibility?

                        • Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
                          Khai-Van Phu

                          Hi Siegmund,

                           

                          Unlike previous DTKs, v2.4 only provides asl.js in its minimal version. I hope to see a non-minified and a minified version in the next releases of SB1's DTK.

                           

                          Having said that you have the choice to keep your SB1's running firmware image v02.01.39 and to use DTK v1.6 and to take advantage of asl.js in its human readable format.

                           

                          Or you have the choice to upgrade your SB1's to current firmware image v03.01.45 and to use DTK v2.4 with asl.js in its minified version.

                           

                          Firmware v03.01.45 introduced several new features/fixes. See release notes here https://atgsupportcentral.motorolasolutions.com/content/emb/docs/ReleaseNotes/Release%20Notes%20-%20SB1%20Windows%20CE%206.0%20v03.01.45.htm.


                          Important note with firmware v03.01.45:

                          -Make sure that you remove all shell configurations setting from your SB1 “userdrive” before updating your SB1 device to new OS version.

                          -Applications developed using the Software Development Toolkit v0.7 will not be compatible with OS v03.01.45. Software Development Toolkit v2.4 should be used with OS v03.01.45

                           

                           

                          Now how to reference asl.js in your web app? Simply use asl.js provided with the corresponding DTK.

                           

                          For an app running locally on SB, you can copy asl.js in folder \UserDrive\apps\MyApp\js\ then make your head section of the index.html file point to it like example below:

                          <head>

                            <meta charset="utf-8">

                            <meta name="viewport" content="width=device-width, initial-scale=1">

                            <title>My App</title>

                            <script src="./js/asl.js"></script>

                          ...

                            </head>


                          Update SB1's file \Userdrive\config\apps.json as follow:

                          {

                            "name": "My App",

                            "url": "http://127.0.0.1:83/UserDrive/apps/MyApp/index.html",

                          }


                          Please have a try and let me know if this work for you.

                           

                          Khai-Van PHU

                            • Re: Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
                              Siegmund Leducq

                              Unlike previous DTKs, v2.4 only provides asl.js in its minimal version. I hope to see a non-minified and a minified version in the next releases of SB1's DTK.

                              • That answers question 1 and I share your hopes


                              Having said that you have the choice to keep your SB1's running firmware image v02.01.39 and to use DTK v1.6 and to take advantage of asl.js in its human readable format.

                              Or you have the choice to upgrade your SB1's to current firmware image v03.01.45 and to use DTK v2.4 with asl.js in its minified version.

                              • As I stated, that doesn't work for me. When using the minified asl.js file, my applications won't run. It DOES work with an older (non-minified) asl.js file, even though I upgraded the device to 3.1.45...

                               

                              Firmware v03.01.45 introduced several new features/fixes. See release notes...

                              • I read that document but I can find no apparent reason for my applications to stop working with the new asl.js file?


                              Make sure that you remove all shell configurations setting from your SB1 “userdrive” before updating your SB1 device to new OS version.

                              • Which settings are considered "shell configuration settings"? Can you give an example?


                              Now how to reference asl.js in your web app? Simply use asl.js provided with the corresponding DTK.

                              • You misunderstood; I have no trouble referencing files and it has nothing to do with a web app.
                              • localhost/applications/www is actually a folder on the SB-1. The UserDrive can be found there, for instance (127.0.0.1/applications/www/Userdrive).
                              • More importantly, it also seems to contain an asl.js file. So my question was whether it would be a good idea to point to this file instead of the one I put on the Userdrive myself. (i.e. like this: <script src="../../../asl.js"></script>)
                                • Re: SB1 development toolkit v2.4 - asl.js uncompressed ?
                                  Khai-Van Phu

                                  Hi Siegmund,

                                   

                                  1 - May I suggest you to clear "all contents" in \UserDrive (files, folders...) of SB1 then make a cold boot (button SCAN + HOME pressed).

                                  2 - Make an update to OS v03.01.45 even though your SB1 is already in v03.01.45.

                                  3 - Put the content of the attached filed SB1's Example.zip available for download here http://we.tl/yfGqNRNrFt in \UserDrive & \Application of the SB1 followed by a COLDBOOT.

                                  4 - Afterwards, put your application in \Userdrive\apps\ and modify \Userdrive\config\apps.json accordingly to point to your app. Note. You will find one copy of file asl.js in \UserDrive\apps\src folder.

                                   

                                  If your apps still not work, can I have a look at it ?

                                   

                                  Regards

                                   

                                  Khai-Van PHU