Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
midhun_vp
Active Contributor

I was excited to hear the announcement about HANA Cloud Platform mobile services trial availability. This is a great opportunity to the developer community to try the solution for free. HCPms is the cloud version of SAP Mobile Platform. SAP had another cloud version of SMP called SAP Mobile Platform, enterprise edition, cloud version it was deprecated.

Even there are few differences between SMP on-premise (SMP 3) and HCPms the mobile SDK is common for both, ie. an app written for SMP 3 runs against HCPms too without any code change - that caught my attention. Here I am going to run one of my existing hybrid mobile app developed for SMP 3 against HCPms.

Prerequisites

Activate HCPms

Apache Ant should be installed and added to path

Android SDK - It also requires Java

Node.js

Cordova - Version is 3.6.3-0.2.13

Git

SMP 3 SP05 SDK

Configure Application in HCPms

From the HCPms admin cockpit (https://hcpmsadmin-<your HANA account user name>.dispatcher.hanatrial.ondemand.com/sap/mobile/admin/ui/home/index.html) click on Applications> Click on Add icon on the bottom bar and provide below details:

Application ID : com.kapsel.logon

Name: com.kapsel.logon

Type: Hybrid

Security Configuration : Basic

Optionally provide Description and Vendor.

Click on Save.

Next, click on Backend and provide the below details.

Backend URL : http://services.odata.org/V2/OData/OData.svc/

Authentication Type: No Authentication

Save the configuration.

Develop Hybrid Mobile App

Follow this blog to develop a kapsel logon based hybrid app. Replace index.html with index.html. Only change needed to run the app with HCPms is providing the HCPms host and port.

Run cordova command:

cordova prepare

Connect phone with PC using USB and execute the cordova command:

cordova run android to run the app in the device.

Offline a Demo

Adding offline functionality to a hybrid app is quite easy using Kapsel plugins. Following the blog Getting Started with Kapsel Offline OData I have added the offline plugin to the app for a small demo.

  • Download datajs file and place it in www folder
  • Replace index.html with index.html
  • Execute below commands from the project path to add the offline plugin.

          cordova -d plugin add com.sap.mp.cordova.plugins.odata

          cordova plugin add org.apache.cordova.network-information

Happy Coding !

Midhun VP

34 Comments
Labels in this area