6 Replies · Latest reply on May 21, 2017 8:52 AM by David Arbour

    Can the cabrillo client be extended?

      The cabrillo.camera.getBarcode() method is extremely useful and powerful, but is there a way to extend the cabrillo client so the mobile app can access a device's camera to take photos rather than scanning barcodes? If it cannot be extended, does anyone know of another way to hook into a mobile device's native camera api through ServiceNow?

       

      Thanks a ton to patrick.wilson and willlisac for the introduction to cabrillo in the Service Portal and Mobile lab at Knowledge17!

        • Re: Can the cabrillo client be extended?
          Will Lisac

          We're currently working on Cabrillo documentation. It's not possible to extend Cabrillo, but we do have an API for adding a file. This will allow you to take a photo that will be uploaded as a file.

           

          Here is an example of the addFile API. Please note that this is not official documentation.  https://gist.github.com/wlisac/e74bffa25e08b611d98c3321f380372c

           

          Does this solve your use case or are you looking for a direct "Take a Photo" API?

           

          Thanks,

          Will

            • Re: Can the cabrillo client be extended?
              David Arbour

              Hi Will! Thanks for the quick response!

               

              Yeah, I'm definitely looking for a direct 'take a photo' API. For a little background... I'm working on a concept/demo that requires a photo be taken of a new user prior to that user being verified to use the application. So the idea is that anyone assisting with the new user registration process would have an iPad or android device available from which a photo could be taken and automatically uploaded to the user record for verification. I'm trying to keep it down to a single step to keep it as simple as possible. One button that says 'Take photo', and it's done!

               

              Do you know of any solutions that would fit this requirement?

               

              Also, while I'm on the subject, why is the cabrillo.geolocation.getCurrentLocation() method so slow to return coordinates? The coordinates I get back have 14 decimal places. Is there a way to quickly return a set of less precise coordinates?

               

              Thanks,

               

              David