Getting started with Android in PingID SDK

This topic details the implementation steps of the PingID SDK flows and logic, which are described in Multifactor authentication (MFA) methods and User device pairing.

PingID SDK supports the following software versions:

  • Android 4.0 and above.
  1. Retrieve the organization account alias from the file: Download the settings file:

    In the PingOne web portal, Setup > PingID > CLIENT INTEGRATION > INTEGRATE WITH PINGID SDK > SETTINGS FILE > Download.

  2. Retrieve the Application ID of your PingID SDK application: In the PingOne web portal, go to Applications > PingID SDK Applications.

    The Application ID is displayed under the application’s name.

  3. Configure the push messaging sender id:

    If you intend to use push messaging in your app, you should have your FCM/GCM SENDER_ID value from either:

  4. Add the PingID SDK component into your existing project:

    • Configure your project with gradle. Refer to

    • Open your top level build.gradle file, to add the PingID SDK component as a dependency. Add the following lines to the allprojects node under the repositories node:

      flatDir {
                   dirs 'libs'
    • Create a libs folder inside your module’s folder. Copy the PingID SDK component file PingID_SDK.aar into it.

    • Inside the module or modules using the PingID SDK component, add the following dependency:

             compile(name: 'PingID_SDK', ext: 'aar')
    • As the PingID SDK component is loaded locally, you’ll have to add the PingID SDK component’s dependencies manually in order to be able to compile and run it. Add these dependencies under the PingID SDK component dependency:

      compile 'org.slf4j:slf4j-api:1.7.7'
      compile 'com.github.tony19:logback-android-core:1.1.1-6'
      compile('com.github.tony19:logback-android-classic:1.1.1-6') {
          exclude group: '', module: 'android'
      compile 'com.nimbusds:nimbus-jose-jwt:4.11'
      compile ''
      compile 'commons-codec:commons-codec:1.5'
      compile 'com.madgag:sc-light-jdk15on:'
      compile 'com.madgag:scprov-jdk15on:'
      compile ''
      compile ''
  1. Integrate the PingID SDK component into your code.

    • Initialize the PingID SDK singleton:
      PingID.init(<Android application object>, <Application ID>, <Object implementing PingIDSDKEvents>,<Push sender ID>, <Supported MFA type>);
      • Arguments:
        • Android application object: The Android application instance of the customer mobile application.
        • Application ID: The application identifier from the Ping Identity web portal.
        • Object implementing PingIDSDKEvents: The object which implements the PingIDSDKEvents interface.
        • Push sender ID: The GCM/FCM sender ID.
        • Supported MFA type: The registration mode for pairing. Possible registration mode values:
          • Automatic: MFA supports remote notifications with automatic fallback to one time passcode.
          • EnforceRemoteNotifications: MFA supports remote notifications only.
          • DisableRemoteNotifications: MFA will not support remote notifications and will only support one time passcode.
    • Integrate the PingID SDK component into the authentication process.
      • In the login request to the customer server, add a string parameter, for passing the payload from the customer mobile application’s PingID SDK component:

        payload = PingID.getInstance().generatePayload();...
        //LoginRequest is a bean used to store data passed to the authentication server
        LoginRequest request = new LoginRequest(); 
      • In the authentication request, you’ll receive information regarding the result of the PingID SDK multifactor authentication.

        String serverPayload = response.getServerPayload();

        After passing the server payload to the PingID SDK component, it will be parsed and processed. If there is anything required to be done by the customer mobile application, an appropriate event will be triggered. Refer to Implement the PingIDSdkEvents interface (Android) for details.