Class PingOneWalletClient.Builder
java.lang.Object
com.pingidentity.sdk.pingonewallet.client.PingOneWalletClient.Builder
- Enclosing class:
PingOneWalletClient
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(boolean allowOtherRegions, PingOneRegion... pingOneRegion) Deprecated.This constructor is deprecated and will be removed in upcoming updates.Builder
(Context context, PingOneRegion... pingOneRegion) Initialize Builder for PingOne region(s). -
Method Summary
Modifier and TypeMethodDescriptionallowOtherPingOneRegions
(boolean allowOtherRegions) Optional: Specify if the SDK can be initialized for other regions, defaults to true.void
build
(androidx.core.util.Consumer<PingOneWalletClient> onResult, androidx.core.util.Consumer<Throwable> onError) 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.setPushToken
(String pushToken) Optional: Pass the push token for the application if available.setStorageErrorHandler
(StorageErrorHandler storageErrorHandler) Optional: Pass the error handler to handle errors thrown when initializing storagesetStorageManager
(StorageManagerContract storageManagerContract) Optional: Pass the custom implementation of StorageManagerContract interface.setWalletCallbackHandler
(WalletCallbackHandler walletCallbackHandler) Required: Pass the callback handler to handle different Wallet actionsuseDefaultStorage
(androidx.fragment.app.FragmentActivity fragmentActivity) If not providing a customStorageManagerContract
, this method must be called to set theFragmentActivity
required forBiometricPrompt
-
Constructor Details
-
Builder
Deprecated.This constructor is deprecated and will be removed in upcoming updates. UseBuilder(Context, PingOneRegion...)
withallowOtherPingOneRegions(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 initializationpingOneRegion
- : boolean indicating if wallet can be registered in other regions
-
Builder
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 ContextpingOneRegion
- : PingOneRegion for wallet initialization
-
-
Method Details
-
allowOtherPingOneRegions
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
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 callinguseDefaultStorage(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 customStorageManagerContract
, this method must be called to set theFragmentActivity
required forBiometricPrompt
- Parameters:
fragmentActivity
- FragmentActivity- Returns:
- PingOneWalletClient.Builder
-
setStorageErrorHandler
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
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. Useinvalid @link
{@link #Builder#build(Consumer, Consumer)
invalid @link
{@link #Builder#useDefaultStorage(FragmentActivity)
- Parameters:
fragmentActivity
- : contextonResult
- : called if initialization is successfulonError
- : called if initialization fails
-