Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert


Hello Developers,

Week 3 openSAP course Developing Mobile Apps with SAP HANA Cloud Platform was quite a short unit. Started with

  • Introduction to SAP Fiori client,

  • device feature support

  • How to access on-premise / cloud based Fiori apps

  • Integrate on-premise / cloud mobile platform

  • Create your own custom Fiori client


Latest SAP Fiori Client 1.5 supports below device OS:

Android : 4.1+

iOS: 7.0+

Windows: 8.1, 10

Benefit of running SAP Fiori apps in the SAP Fiori client are:

  • Improved management of the app resources using the cache manager plugin

  • Handling of authentication challenges within a web view via AuthProxy plugin

  • Customize app title, screen, splash screen

  • Native device functionalities

  • Security enhancements

  • Provisioning the user certificate through SAP Mobile Secure and SMP


My findings:

  1. If you want to customize SAP Fiori client, make sure to install SMP3 Mobile SDK.

  2. Before running node create_fiori_client.js command, make sure you have run npm install and can see node_modules folder under C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client path.


Otherwise you might see error, Error: Cannot find module 'unzip' at Function.Module.resolveFilename

3.   An easy way to check if an android device has been detected successfully on the PC (via USB) by typing adb devices. If not, please insall the Google      USB driver.

        

         

4. Proxying HCP fiori content through HANA Cloud Platform Mobile Services (HCPms) not working at the moment.



5.  As per this discussion, there seems to be an issue with the gradle-andorid-aspectj-plugin.

Error message: Could not find property 'javaCompiler' on com.android.build.gradle.interna .api.LibraryVariantImpl_Decorated@xxxxx



Workaround: In Fiori_client project, navigate to C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\myopensapfioriclient\platforms\android\CordovaLib and look for built.gradle file and change its version to 0.9.12



6. SAP has been rebranding with its product and solutions for quite a long time. If you dont find HCPms on SAP HANA Cloud Platform cockpit, dont be                surprise, its now  'mobile services' :wink:



7. Easy way to build and deploy an app to android device

cordova build android

cordova run android (on device connected via USB)

OR  cordova emulate android (on android emulator)

8. If you dont have SAP Fiori URL (or work email address), you can try out SAP Fiori using sample Data (in Demo mode). e.g. My Inbox, Travel requests, order products etc.

9. If something goes wrong while accessing an application, go to SETTINGS and clear LOG, clear CACHE and clear ALL APPLICATION SETTINGS

10. Fiori URL is always mentioned in appConfig.js file (under C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\myopensapfioriclient\www)

11. An easy way to generate keystore file (default password: changeit)

 



12. For signing Android apk

 

  • copy the myopensap keystore to the C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\myopensapfioriclient\platforms\android\build\outputs\apk

  • open CMD command by navigating to java bin folder.

  • copy paste below command


jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\myopensapfioriclient\platforms\android\build\outputs\apk\myopensap.keystore C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\myopensapfioriclient\platforms\android\build\outputs\apk\android-armv7-debug.apk myopensap

I got below result:



13. In case if you get an error like unable to sign jar: java.util.zip.ZipException , follow the solution mentioned here.

14. Optimize apk using zipalign tool > navigate to android sdk folder C:\Users\KansalJK\AppData\Local\Android\android-sdk\build-tools\23.0.1

run below command
C:\Users\KansalJK\AppData\Local\Android\android-sdk\build-tools\23.0.1>zipalign

-v 4 C:\SAP\MobileSDK3\KapselSDK\apps\fiori_client\myopensapfioriclient\platform

s\android\build\outputs\apk\android-armv7-debug.apk myopensapfioriclient.apk

Response: you will get myopensapfioriclient.apk generated in android path.


You can ask your queries in discussion section of this course.


For more info,follow


SMP and HCPms: SMP Developer Center


SAP Web IDE, SAP HAT : SAPUI5 Developer Center


SAP HCP : SAP HANA Cloud Platform Developer Center


SAP HANA Cloud portal: SAP HANA Cloud Portal


 

Week 1: SAP Mobile strategy -openSAP-Developing mobile apps with HCP-Week 1

Week 2: SAP Web IDE deep dive-openSAP-Developing mobile apps with HCP-Week 2

Week 4: #HCPms helps you in mobilizing Fiori Apps -openSAP-Developing mobile apps with HCP-Week 4

Week 5: Run your mobile app in offline and best practices-openSAP-Developing mobile apps with HCP-Week 5

Week 6: Secure your mobile-openSAP-Developing mobile apps with HCP-Week 6

4 Comments