Class PingOneWalletClient.Builder

java.lang.Object
com.pingidentity.sdk.pingonewallet.client.PingOneWalletClient.Builder
Enclosing class:
PingOneWalletClient

public static class PingOneWalletClient.Builder extends Object
  • Constructor Details

    • Builder

      public Builder(boolean allowOtherRegions, PingOneRegion... pingOneRegion)
      Deprecated.
      This constructor is deprecated and will be removed in upcoming updates. Use Builder(Context, PingOneRegion...) with allowOtherPingOneRegions(boolean) instead. Initialize Builder for PingOne region(s). SDK will register the wallet in the region(s) passed here at the time of initialization.
      Parameters:
      allowOtherRegions - : PingOneRegion for wallet initialization
      pingOneRegion - : boolean indicating if wallet can be registered in other regions
    • Builder

      public Builder(Context context, PingOneRegion... pingOneRegion)
      Initialize Builder for PingOne region(s). SDK will register the wallet in the region(s) passed here at the time of initialization.
      Parameters:
      context - : Application Context
      pingOneRegion - : PingOneRegion for wallet initialization
  • Method Details

    • allowOtherPingOneRegions

      public PingOneWalletClient.Builder allowOtherPingOneRegions(boolean allowOtherRegions)
      Optional: Specify if the SDK can be initialized for other regions, defaults to true. If allowOtherRegions is set to true, wallet will automatically register to the new region at the time of the request. If allowOtherRegions is set to false, wallet will throw error when trying to perform an action in unsupported regions.
      Parameters:
      allowOtherRegions - PingOneRegion for wallet initialization
      Returns:
      PingOneWalletClient.Builder
    • setStorageManager

      public PingOneWalletClient.Builder setStorageManager(StorageManagerContract storageManagerContract)
      Optional: Pass the custom implementation of StorageManagerContract interface. SDK already has a default implementation of StorageManagerContract that utilizes the cryptographic keys from secure keystore (StrongBox backed when available). You must set the FragmentActivity by calling useDefaultStorage(FragmentActivity) if using the storage manager provided by the SDK.
      Parameters:
      storageManagerContract - : Custom implementation of StorageManagerContract
      Returns:
      PingOneWalletClient.Builder
    • useDefaultStorage

      public PingOneWalletClient.Builder useDefaultStorage(androidx.fragment.app.FragmentActivity fragmentActivity)
      If not providing a custom StorageManagerContract, this method must be called to set the FragmentActivity required for BiometricPrompt
      Parameters:
      fragmentActivity - FragmentActivity
      Returns:
      PingOneWalletClient.Builder
    • setStorageErrorHandler

      public PingOneWalletClient.Builder setStorageErrorHandler(StorageErrorHandler storageErrorHandler)
      Optional: Pass the error handler to handle errors thrown when initializing storage
      Parameters:
      storageErrorHandler - : StorageErrorHandler
      Returns:
      PingOneWalletClient.Builder
      See Also:
    • setWalletCallbackHandler

      public PingOneWalletClient.Builder setWalletCallbackHandler(WalletCallbackHandler walletCallbackHandler)
      Required: Pass the callback handler to handle different Wallet actions
      Parameters:
      walletCallbackHandler - : Implementation of WalletCallbackHandler
      Returns:
      PingOneWalletClient.Builder
      See Also:
    • setPushToken

      public PingOneWalletClient.Builder setPushToken(String pushToken)
      Optional: Pass the push token for the application if available. You can set the value later using PingOneWalletClient as well.
      Parameters:
      pushToken - : Firebase token for the application
      Returns:
      PingOneWalletClient.Builder
    • build

      public void build(androidx.core.util.Consumer<PingOneWalletClient> onResult, androidx.core.util.Consumer<Throwable> onError)
    • build

      public void build(androidx.fragment.app.FragmentActivity fragmentActivity, androidx.core.util.Consumer<PingOneWalletClient> onResult, androidx.core.util.Consumer<Throwable> onError)
      Deprecated.
      This method is deprecated and will be removed in upcoming updates. Use
      invalid @link
      {@link #Builder#build(Consumer, Consumer)
      }. Call
      invalid @link
      {@link #Builder#useDefaultStorage(FragmentActivity)
      } to continue using the default storage. Call to initialize PingOneWalletClient after passing all the parameters.
      Parameters:
      fragmentActivity - : context
      onResult - : called if initialization is successful
      onError - : called if initialization fails