2 Steps to Manage Mobile App Registration using Client Hub
Client Hub is a mobile application that comes with SAP Mobile Platform SDK. When we have multiple enterprise applications in the device, Client Hub app helps to share common credentials between the apps. Hence the user doesn’t need to enter same credentials multiple times to login to multiple apps that improves user experience.
Client Hub app has to be installed in the device along with other business apps – when the user enter the credentials for the first time in an enterprise application, it will be stored in the Client Hub (data-vault). And all other apps access these credentials for registration with SAP Mobile Platform, ie. other applications will not prompt the user to enter credentials for login.
Only condition is, all applications including Client Hub has to be signed with same certificate. In this blog I am explaining how to do it.
Step 1 – Signing apps with same certificate
The source code of the Client Hub app can be found in the SMP 3 SDK installation path..SAP\MobileSDK3\ClientHub. Here I am using Android as an example. Client hub app is available for iOS too. Client Hub app works only with MAF Logon – It supports both Odata and Kapsel apps.
Import the Client Hub project to Android SDK. Then Right click on the project > Export.
Click Next until you reach Keystore selection screen. Choose “Create new keystore”, and provide keystore name and password. Click Next and enter the details as given below.
Click Next, then click on Finish. It creates Client Hub apk file and keystore.
In the business application create clienthub.properties file inside res/raw folder and provide connection details as given below.
Inside Manifest.xml file include permission for clienthub access – <uses-permission android:name=”com.sap.mobile.clientHub.CLIENTHUB_ACCESS_PERMISSION”/>
Finally, right click on the business application and choose Export. Instead of choosing “Create new keystore” choose “Use existing keystore” and browse the keystore created in the previous step. Repeat this step for all the business apps, and create the apk files.
Step 2 – Installation and Testing
Install all the enterprise apps including Client Hub app in a device and test.