Page tree
Skip to end of metadata
Go to start of metadata

This guide will lead you through the steps necessary to setup single sign-on (SSO) to NetWeaver HANA Cloud application from an Android system.

Table of Contents

Prerequisites

  • You would need to have an android device with Android OS Version 4.0.3 or later. If you don’t own such a device then you can run the application with the emulator provided by Google. Check the #Android Emulator Setup section for details.
  • An SAP Community Network (SCN) account is needed as part of the setup process. In case you do not have one, then please register at http://www.sdn.sap.com/irj/scn.
  • Java SDK 1.6 or later is needed to run the Android Emulator

Android Emulator Setup

If you do not have an Android device with at least Android OS Version 4.0.3 you would need to use an emulator in order to run the application. Since an IDE is not needed for the run, this guide omits the IDE setup

Disclaimer

All steps and actions described in this section are based on the current state of the documentation for Android SDK at http://developer.android.com/sdk/index.html. Since this documentation is not supported by SAP there might be discrepancies in the screenshots and the steps. Please consult the Android SDK documentation if you notice such.


Download the Android SDK and SDK packages

  1. Go to http://developer.android.com/sdk/index.html and click on the “Use an existing IDE” link. The section will expand and it will contain a button that allows you to download the SDK Tools package for your OS. Press it and go through the installation.
  2. Start the Android SDK manager. Depending on your OS you need to do following:
    1. Windows – go to the installation folder of the SDK and start the “SDK Manager.exe”  executable
    2. Linux  and Mac OS – open a command prompt in <SDK installation folder>/tools and execute “android sdk”
  3. (Optional) If you are using Internet via proxy then you need to configure it for the SDK Manager. You can configure it in Tools -> Options and then select Packages -> Reload to retrieve the packages again.
  4. Download SDK platform for version 4.0.3 or later:

Note

You need at least SDK Platform and one System Image. You will have to accept the license agreement on the next page.

 Create an Android Virtual Device (AVD)

  1. Start the AVD manager. Depending on your OS you need to do following:
    1. Windows – go to the installation folder of the SDK and start the “AVD Manager.exe”  executable
    2. Linux  and Mac OS – open a command prompt in <SDK installation folder>/tools and execute “android avd”
  2. Press the “New…” button and create a new AVD image:
  3. Start the created AVD with user who has administrative permissions

Note

In case you get an error that there is not enough memory to start the AVD image then you have following options:

  • If running under Windows – try to run the AVD manager as Administrator
  • If this doesn’t help – reduce the RAM size to 768 or 512 (this might slow down the emulator run though)

Download the xLeave Mobile Application Package

  1. Go to https://downloadsimbg-scnusers.netweaver.ondemand.com/download?resource=xleavemobile.zip
  2. Login with your SCN user and download the xLeave Mobile application package from there.

The package is one zip archive and should contain following files

  • xleavemobile.apk file – contains the xLeave Mobile application
  • personal.p12 – contains the personal certificate
  • sapnetca.crt – contains the CA certificate of the used HANA Cloud application
  • readme.txt file – contains the usernames and passwords needed for the setup
    Extract the zip archive to an arbitrary folder.

Configure the xLeave Mobile Application in the AVD

Prerequisite

The AVD must be started.

All the commands bellow are be executed via the Android Debug Bridge (adb) console tool coming with Android SDK. For details about the command options of the tool check at http://developer.android.com/tools/help/adb.html.
To execute the given commands you should open a command prompt in the folder where the adb tool is located <Android SDK installation folder>/platform-tools.

Upload and Install the CA Certificate

Execute following command:

adb push <path to the sapnetca.crt> /sdcard/sapnetca.crt

In the running Android emulator go to the home screen, press the menu button (emulator shortcut – F2) and select “System settings” -> “Security” -> “Install from SD Card”

Follow the instructions for configuring screen password and choose any of the options offered.

To check that the certificate was installed – select “Trusted Credentials” and go to the “User” tab. The SAPNet CA certificate should be listed there.

Upload and Install the Personal Certificate

Execute following command:

adb push <path to the personal.p12> /sdcard/personal.p12

In the running Android emulator go to the home screen, press the menu button (emulator shortcut – F2) and select “System settings” -> “Security” -> “Install from SD Card”

In the next dialog enter the password for the personal.p12 as written in the readme.txt file and then finish the installation process.

Install the xLeave Mobile Application

Execute following command:

adb install <path to the xleavemobile.apk>

The xLeave Mobile application should appear in your application list.

Configure Proxy for the xLeave Mobile Application(optional)

In case you normally access the Internet through a proxy you would need to configure it for xLeave Mobile application too. To do this:

  1. Start the xLeave Mobile application
  2. Press the Menu button (emulator shortcut – F2) and select the “Settings”
  3. Enter the proxy host and proxy port in the corresponding properties
  4. Press the “Back” button

Authenticate with Username and Password as Employee in the xLeave Mobile Application and Create Leave Request

  1. Start the xLeave Mobile application and press the “Log In” button
  2. In the dialog enter the username and password for employee user as described in the readme.txt file and press “Log In”
  3. On the next screen select the “Create New Leave Request” item
  4. Enter the details for your leave request and press the “Send” Button
  5. You should have your leave request created now. You can check its status in the “Personal Leave Overview” section. From there you can also cancel it in case you wish to

Authenticate with Client Certificate as a Manager in the xLeave Mobile Application and Approve/Deny Leave Requests

As a manager you will use a stronger and more secure authentication method – with a client certificate. We have already imported one into the Android central keystore and will use it now.

  1. If you still have a session in the xLeave Mobile application then you should logout first. For the purpose – press the Menu button and select “Logout”
  2. Now switch the authentication method to “Client Certificate” – press the Menu button, select “Settings” and change the preferred authentication method to Client Certificate:
  3. Go back to the main screen and press “Log In”
  4. The Android OS will ask you to allow the xLeave Mobile application to use a client certificate from the central keystore. Press the “Allow” button here:
  5. You are now logged in as manager and have one more option – to review the pending leave requests. Select it:
  6. On the next screen you’ll see what pending leave requests there are including the one that we created a few moments ago. Select any of them to approve or deny it:
  7. On the next screen you can view the request details and check the team availability for the days of the request:

    You can even press the corresponding date and see who exactly is out of office on that day:
  8. Based on that information you can decide whether you want to approve or deny the request. After you do that you will be returned on the previous screen and if there are no more requests to approve you will go directly to the dashboard screen


  • No labels