Android SDK - Development Environment Setup

Paydiant is now PayPal's White Label Wallet (WLW) Platform.

PayPal's WLW Android SDK Package is delivered as a compiled bundle that contains all the necessary components for building a mobile payments app on the Android operating system that implements all the functionality offered by the WLW mobile payments platform.

Android SDK Package Contents

The SDK Package for Android development includes the following contents:

WLW Android SDK jar file

  • android-sdk- or later

Set Up Your Development Environment

Before you begin using the SDK package, create a development environment as follows:

  1. Install Homebrew if you are using a Mac.
  2. Make sure that Java 7 or Java 8 is installed on your machine. You can install Java by downloading the Java Development Kit from the Oracle Java website. Check your Java version by typing javac -version in the command line. The output should display the Java version, Java runtime environment, and the Java hotspot version.
  3. Install and setup Gradle to your computer. If Homebrew is installed on your machine, you can do this by typing brew install guide in the command line prompt. This will install Gradle and some of the necessary dependencies on your machine. Third party dependencies that need to be installed are:
  compile fileTree(dir: 'libs', include: ['\*.jar']) //add the SDK jar and zxing jar from libs folder
  compile ''
  compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.8.1'
  compile 'com.squareup.okhttp3:okhttp:3.4.1'
  compile 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
  compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
  compile ''
  compile ''
  compile ''
  1. If Homebrew is not installed on your machine, download the Gradle binaries and follow the instructions in the installation guide.
  2. Download the Android SDK and install Android Studio.

Configure Your Android API for the WLW Project

The WLW Platform Android SDK relies on certain Android API configurations and prerequisites, as defined in the AndroidManifest.xml.

WLW supports Android OS versions totaling up to 80% of the market share, including the latest OS version and any historical versions that have 10%+ of the market share. Android adoption is monitored each month and OS support is adjusted accordingly.

Required SDK version

Version 19 or later

For example: < uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23"/ >

Required features


Required permissions

  • android.permission.INTERNET
  • android.permission.READ_PHONE_STATE
  • android.permission.ACCESS_NETWORK_STATE
  • android.permission.CAMERA
  • android.permission.FLASHLIGHT
  • android.permission.ACCESS_WIFI_STATE

Sample Android manifest

The following code sample provides an example of the AndroidManifest.xml file configuration.

< ?xml version="1.0" encoding="utf-8"?>
< manifest xmlns:android=""
package="" android:versionCode="1000" ndroid:versionName="1.0.0">
< uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11"/>
< uses-feature android:name="" />
< uses-permission android:name="android.permission.INTERNET" />
< uses-permission android:name="android.permission.READ_PHONE_STATE" />
< uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
< uses-permission android:name="android.permission.CAMERA" />
< uses-permission android:name="android.permission.FLASHLIGHT" />
< uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
< application android:label="@string/app_name" android:icon="@drawable/icon"
< !-- List of Activities -->
< activity android:name=".MainActivity"
android:label="@string/app_name" android:screenOrientation="portrait">
< intent-filter>
< /intent-filter>
< /activity>
< activity ....>
< /activity>
< !-- List of services -->
< service android:name= "" />
< service .... />
< service .... />
< /application>
< /manifest>

Configure Your Development Environment with the WLW Service

Define the following environment variables for your development environment:

Variable Description
Host The Host name where the mobile gateway resides, for example,
Protocol The protocol to be used when calling the mobile gateway. For this version it is https.
Host URL Path The mobile gateway path relative to the host. Always set this to /mobile. When constructing the HOST URL, this should be appended to the Host value above, for example,
App Signature The identification of your application’s signature verification, in byte format, which can easily be converted to the string value.
API Key The identifier of the specific API service to which you are directing each call from the app.

Configure Your SDK Instance

Prior to beginning any development using this SDK, you must initialize the WLW SDK using the following method: hostURL, String protocol, ContextWrapper contextWrapper, byte[] appSignature byte[] apiKey)

Note: Application Context is required at initialization and will result in an illegalArgumentException if not included, and appSignature and apiKey values must be specified in byte format, not string.

The following code sample shows a sample SDK configuration.

private static final String HOST_IP = "";
private static final String HOST_URL = HOST_IP + "";
private static final String PROTOCOL = "";
private ContextWrapper androidContextInstance;
private byte[] appSignature = new byte[]{0x6d, 0x79, 0x2d, 0x61, 0x70, 0x70};
private byte[] apiKey = new byte[]{1a7c, 1x6d, 0x4p, 1x31, 1x5z, 1x69};
.setupPaydiantApplicationConfig(HOST_URL, PROTOCOL, androidContextInstance, appSignature, apiKey);

Configure optional SDK instance settings

You can run an overloaded method with two optional parameters in lieu of the standard SDK configuration method to set values for supported optional properties. hostURL, String protocol, ContextWrapper contextWrapper, byte[] appSignature, byte[] apiKey, paydiantSDKConfigProps, customAppVersionName)

The paydiantSDKConfigProps parameter allows you to set Boolean properties that specify whether the login password/passcode (PIN)/secret question responses (MFA) shall be encrypted during transmission to the mobile gateway and also whether the secret question responses (MFA) shall be captured with case sensitivity:


The default value for encryption of the login credentials is FALSE. This means the password, PIN and MFA response are encrypted during transmission.

The default value for MFA response case sensitivity is also FALSE. This means that the server will accept a value of Los Angeles as well as los angeles, regardless of how it was originally entered by the user.

If your environment requires configuration overriding the default value for any of these properties, you need set the alternate value for only the properties to be overridden.

Note: The settings for login credential encryption must match the corresponding settings on the Issuer’s onboarding configuration or login will fail. Consult your WLW support representative to verify whether non-default configuration for any other these properties is required for your security environment.


The customAppVersionName parameter allows you to set an alternative application version to override WLW’s default a.b.c.d.e versioning format. This custom value will supersede the default setting in the AndroidManifest. Define the setting as follows: private String customAppVersionName = "5.10" ` The following code sample shows an example overloaded SDK configuration with the following optional property settings:

  • login password encryption disabled
  • secret password response case-sensitivity enabled
  • passcode and MFA encryption properties omitted, indicating that the default value of TRUE will be observed
  • custom app version set to 5.10 instead of the default
private final String HOST = "";
private final String HOST_URL = HOST + "/";
private final String PROTOCOL = "";
private ContextWrapper androidContextInstance;
private byte[] appSignature = new byte[]{0x6d, 0x79, 0x2d, 0x61, 0x70, 0x70};
private byte[] apiKey = new byte[]{1a7c, 1x6d, 0x4p, 1x31, 1x5z, 1x69};
private Properties sdkConfigProperties = new Properties();
private String customAppVersionName = "<5.10>"
// Disable password encryption and enable MFA case sensitivity:
(, false, true);

PaydiantApplicationConfig.getPaydiantApplicationConfig().setupPaydiantApplicationConfig(HOST_URL, PROTOCOL, androidContextInstance, appSignature, apiKey, sdkConfigProperties, customAppVersionName);

Enable System Logging

As of SDK version 5.10, WLW’s default Logging Utility is automatically initialized by the SDK and the app is no longer required to explicitly initialize SDK logging.

However, the Logging Utility does need to be included as a service in the AndroidManifest file, as shown in the following excerpt:


Configure a custom logging utility implementation

Developers who wish to implement their own custom logging utility can initialize that implementation by setting the custom logging utility interface class:


Refer to Custom Logging Utility for more information about implementing a custom logging utility.

Success and Failure Callbacks

This guide lists the appropriate success and failure callbacks. The developer should use that information to configure the success and failure callbacks to initiate appropriate behavior in the app upon completion of the method.

Other Resources