7. Adding Mobile Native features
Appgyver is a Low-code no-code platform with which you can build apps quickly.
You can refer to my bog Appgyver- Introduction where I tried to put some introduction and SAP’s acquisition of Appgyver.
In the previous blogs I have explained how you can get onboarded in Appgyver, what are the main constitutes of the Appgyver IDE – Composer Pro, We then created our first App in Appgyver, added some validation logic, then we worked on the data source and variable to build a working app. Lastly we integrated the app with BTP by using an OData Service exposed from SAP BTP using Cloud Application Programming (CAP).
So far our app is looking like below and it’s operating with end to end back end service integrating with SAP BTP.
Now we’ll add some cool native mobile features in the app to spice things up. We’d like to add a functionality to click an image for the purpose of attaching it with the ticket.
First we added some layout to add a button for clicking image and another button to delete image. Also add a container to preview the image.
When Appgyver takes an image, it stores the local path of the image. In order to work with the image we need a page variable to store the image path.
We added a page variable as below
Now add the flow logic as below to click an image.
We added the flow logic to set the page variable based on the previous control that is actually taking the picture.
Set image preview container
To set the image preview, just set the binding of the container to the page variable that is containing the image.
Deleting the image
To delete the image we added another button and add the following flow logic.
Note the file deletion flow logic is nor available by default. You need to install the same from marketplace.
Now let’s run a test to see if the app is able to open phone Camera, taking a picture, showing it within the app and was able to delete the picture.
Here is the results
So now, we have added native features of mobile in the app. Similarly we can add other native features like sound recording, video capture, barcode scanning etc. pretty easily.
Great blog series, Thanks!