SAP Cloud Platform Mobile Services Build Feature – What can it do for you
In the end of 2017, SAP announced the end of maintenance for the Hybrid App Toolkit add-on, also named HAT. Instead of the HAT toolkit, SAP introduced the Cloud build feature which is part of Mobile services. You can find more details about this announced in the blog published by Ludo Noens: https://blogs.sap.com/2017/12/18/end-of-maintenance-for-hybrid-app-toolkit-local-add-on
I was very happy with this announcement, finally no need to install any tool anymore to build my apps. Installing the HAT toolkit was not that hard but it always took some time (time we don’t have during projects). Also, the HAT toolkit required updates frequently, which again took time. This Cloud build feature will ensure us that we don’t have to install anything.
During this announcement, I just started on a new Mobile project. Perfect timing to investigate if the Cloud Build feature was relevant for the project. Main requirement for Mobile Services, the mobile app should have offline capabilities. For that reason, I was looking into mobile services, HAT and the Cloud Build Feature.
Web IDE Cloud Build
I created a first sample app to try out the new Cloud Build feature and already came across my first issue:
I wanted to build my mobile app using the SAP Web IDE. First, I had to deploy it to the Cloud platform, no problem. Then I had to register it to the Fiori Cloud Launchpad, again no problem, at least that’s what I thought. Apparently, the Fiori Cloud Launchpad was not part of our license?! We have Mobile Services (which has the Cloud Build feature) but it still requires the Fiori Cloud Launchpad?!
This means you need SAP Fiori Launchpad in SCP to use the Cloud Build option in the SAP Web IDE
Mobile Services Cloud Build
Although it wasn’t possible in the SAP Web IDE, I didn’t give up. Instead of the SAP Web IDE, I went looking directly in the Build feature of SCP Mobile Services. There I had multiple options:
- the defaulted option was the Fiori Cloud Launchpad
- This is the same as in the SAP Web IDE, useless because we don’t have the Cloud Portal in the license.
- a custom URL
- I could enter a free url, this looked an interesting option
- Fiori destination
- Like the custom url option but here the URL is wrapped in a destination
Regarding the documentation, the options “custom url” and “Fiori destination” should allow us to configure the Cloud Build for on-premise apps. This could be a work-around for missing the Cloud Portal in our license. So, I tried it out:
Issue: which URL should we use? Expecting that my app should use SCP Mobile Services (for offline support), I assumed I had to use my SCP destination to the backend and used the virtual defined url for the Fiori launchpad (which is configured in the Cloud Connector).
Result: didn’t work…
Solution: Use the on-premise url for your app or Fiori Launchpad. (see this tutorial: https://blogs.sap.com/2018/01/24/create-a-fiori-client-with-the-cloud-build-service-for-on-premise-fiori-launchpad/ )
Warning: In the end, this is just a build of the Fiori client with a predefined url and without any connection to SCP Mobile Services.
This means, I still need to use the HAT add-on to support offline…
The Build Feature for on-premise apps is just building the Fiori Client with a predefined url. Nothing more, yet.
If you want to use SCP Mobile Services and don’t have the Cloud Portal, you still need the HAT toolkit to build apps (even if you know that it will be deprecated).
SAP has some work to do before they can deprecate HAT, Cloud Build should support every function of the HAT first.
Thanks for sharing your findings. Allow me to clarify a few points.
Product Owner - Hybrid Application Toolkit
Okay, Thank you Ludo. That explains a lot. With making the announcement of "end-of-maintenance" it was not clear to me what option I should use. I tried to use the cloud build but it just didn't covered my needs. I thought I had to use it because of the "end-of-maintenance"... it confused me a bit 🙂
I just think it's important that you have an alternative before HAT is in "end-of-maintenance". If cordova, xcode, android or something else that HAT uses requires an update, HAT should also require an update. Otherwise we'll not be able to support the latest mobile os versions.
Looking forward to these new features in May.
Kind regards, Wouter
I have been using the cloud build service with an offline fiori app successfully. I see above in step (6) you're recommending we don't do this however?
I understand that there are limitations, such as not having control over the defining queries and when they are made but otherwise it seems fine.
One major issue for us however is images. We need to be able to take images with the phone camera in offline mode. Is this possible with a cloud-build app? I can only find some very scarce and minimal documentation on this subject and its all old and using Kapsel plugins... Any ideas?
I am sure you were able to get this working, so for your case, step (6) is not applicable 🙂 . For most other users, I would still recommend it until we release our new features in May.
As for the offline image question: this might be the same material you are referring to: https://help.sap.com/viewer/42dc90f1e1ed45d9aafad60c80646d10/3.0.15/en-US/003a9184ef7e4806ac07afdce6f3f5d9.html and https://help.sap.com/viewer/42dc90f1e1ed45d9aafad60c80646d10/3.0.15/en-US/b3d5086b61a74733aac7ca9576588d9f.html
Thanks Ludo.... You know I've been reading these exact documents and though it didn't apply because I didn't have access to the store... But I do: "sap.OData.stores". Great so we should be able to attach photos while offline.
Do you know with a cloud build fiori app if we can change the assets used in the logon process - most importantly - change the image from a flower to something else in the passcode screen...
I know... I'm probably pushing my luck here!
Must say... the cloud build service sure makes it easy to mobilise fiori apps!
Actually... if we just want to do creates while offline do we still need the registerStreamrequests call. It seems that this downloads media.
Maybe we don't even need it set as a defining request if only doing creates. Would be great if SAP published reference applications for this functionality...
Can we do it solely with:
Hey Ludo. Thanks for the update. As I understand it you have however depricated the offline templates for hybrid offline apps. Not a lot of help create offline apps without them?
We will provide guidelines on how to develop offline apps with the functionality becoming available in May. The offline template will become obsolete then.