How do I get the data of a taken image?

Tagged:
  • Steffen
        5 years ago #15626

        Hello,

        I like to take a picture (mobile action) and submit it to a REST API. However, I cannot figure out how to get the data of the actual picture?

        Thanks
        Steffen

        Armin Winkler
            Has successfully completed the online course Introduction
            Has successfully completed the online course Intermediate (200)
            Has successfully completed the online course Advanced (300)
            Has successfully completed the online course Basics (100)
          3 years ago #27837
          Up
          1
          Down
          ::

          Hi Zeljko,

           

          first off let me say that everything Chris mentioned in his posting from 2 years ago regarding the specification of the REST API is still valid, so the most important thing you need to be aware of is what kind of data and in which format the data needs to be send to the API. Unfortunately a recording of said web session is not available as it was a paid enabling session between the customer and Simplifier which is usually never recorded or only on agreement of the customer.

           

          Ok, so concerning your use case, your first step would be to set up a REST connector and a corresponding connector call including the necessary parameters and authentication that the API expects. The same goes for passing your data to SAP later on but with another connector using the prefered method of connecting to SAP from your side (SAP RFC, SOAP, oDATA, REST). Now inside your application you can make use of the native camera functionality of your mobile device utilizing a Mobile Action ‘Capture Image’ in Simplifier’s Process Designer and accessing the deployed application via our Mobile Client. The handling of a taken picture and its actual data is quite easy if you make use of our standard client-side Business Object (BO) named “SIMP_FileHelper” which offers a variety of functions to convert the image to a Blob or data url for example. If you don’t find this BO on your instance yet, be sure to first import our Standard Content package to your system.

          The output of the BO function can than be used as an input for your REST connector call. If necessary, any further converting of the data can be done using a script activity in the Process Designer and Javascript code, in that case you can use a variable inside of your application to temporarily store the image data.

           

          Hope this helps you, regards,

          Armin

          Chris Bouveret
              Has successfully completed the online course Introduction
              Has successfully completed the online course Intermediate (200)
              Has successfully completed the online course Advanced (300)
              Has successfully completed the online course Basics (100)
              Has successfully completed the online course Advanced (320)
              Has successfully completed the Intermediate Certification
              Has successfully completed the Advanced Certification
            5 years ago #15633
            Up
            0
            Down
            ::

            Hi Steffen,

            this is a little more complex, we will elaborate on this within our scheduled websession. Just a brief preview:
            Showing the taken image within your App is quite easy, just point to the local imageUrl within a Image Widget. If you want to pass the image to a REST Endpoint it really depends on how your REST API is set up and what type of data it expects. Another way would be to use the ContentRepo Plugin, but more on that in the Webssession.

            Hope that helps

            Zeljko Dzunic
                Has successfully completed the online course Basics (100)
              3 years ago #27834
              Up
              0
              Down
              ::

              Hi Chris,

              I would like to make exactly the same demo. I plan to take an image of receipt and than send the image as a parameter of REST API for MS cognitive services. At the end, I would like to pass extracted information to SAP.
              Is it possible to get a link to this websession (if it is recorded) or some other link where can I find more information about taking an image in Simplifier, calling REST API and then saving the data in SAP? I have developed such a demo in MS Power Platform (https://youtu.be/pv_VUA1D8Bw), now I want to see advantages of Simplifier.

              Thanks,

              Zeljko

            Viewing 4 posts - 1 through 4 (of 4 total)

            You must be logged in to reply to this topic.