Package-level declarations

Types

Link copied to clipboard
open class About
A utility class to retrieve information about the SAP BTP SDK for Android, operating system, brand, model, and manufacturer.
Link copied to clipboard

Represents the exception encountered when calling an API because the admin locks the network traffic or the registration of the user.

Link copied to clipboard
Link copied to clipboard

Facilitates keeping a global reference to a Networking Client that has been initialized with all the necessary Authentication and other interceptors. Generally the application developer will set the initialized okHttpClient once and get it from any where a okHttpClient is needed for the server communication. The set must be called at least once.

Link copied to clipboard
open class CpmsParameters
Link copied to clipboard
class DiscoveryService(context: Context)

Represents the service to retrieve AppConfig from discovery service, it will try to call API without application version information, if failed, then try with version.

Link copied to clipboard
Facilitates keeping a global reference to discovery service host.
Link copied to clipboard
class EncryptionError : Exception
Signals that an error occurred during encryption.
Link copied to clipboard
open class EncryptionInputStream : FilterInputStream
This class provides a wrapper for an InputStream that encrypts or decrypts the bytes as they are read.
Link copied to clipboard
open class EncryptionOutputStream : FilterOutputStream
This class provides a wrapper for an OutputStream that encrypts or decrypts the bytes as they are read.
Link copied to clipboard
Describes different encryption states associated with the encryption key generation mechanisms.
Link copied to clipboard
open class EncryptionUtil
Provides a protected storage for the users to generate and access their encryption key associated with an alias.
Link copied to clipboard
open class RawEncryption
This class provides methods to encrypt and decrypt byte streams and byte arrays.
Link copied to clipboard
abstract class SDKExceptions(val message: String, val code: ServiceErrorCode = ServiceErrorCode.UNKNOWN) : Exception

Represents the exception used for all services.

Link copied to clipboard
This Class holds the basic settings parameters There are ApplicationId, deviceID, applicationVersion,backendURL, and version of the server
Link copied to clipboard
open class SettingsProvider
Facilitates keeping a global reference to application SettingsParameters, including ApplicationId, deviceID, applicationVersion,backendURL, and version of the server.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
@JvmOverloads
fun OkHttpClient.addUniqueInterceptor(interceptor: Interceptor, save: Boolean = true): OkHttpClient

Creates a new instance of OkHttpClient after adding the given interceptor, and saves it into ClientProvider if save is true.

Link copied to clipboard
@JvmOverloads
fun OkHttpClient.addUniqueNetworkInterceptor(interceptor: Interceptor, save: Boolean = true): OkHttpClient

Creates a new instance of OkHttpClient after adding the given network interceptor, and saves it into ClientProvider if save is true.

Link copied to clipboard
fun Exception.isAttestationFailure(): Boolean
Link copied to clipboard
inline fun <T : SDKExceptions> Exception.isCausedBy(): Boolean

Checks whether the current 'Exception' is caused by Android Attestation. This is usually being used to check the exception thrown from interceptors to see the real cause.

Link copied to clipboard
fun Exception.isUnauthorized(): Boolean

Checks whether the current 'Exception' is caused by OAuth token expiration. This may usually be used in widget request calls when the widget wants to know the exact reason the request failure thus show meaningful messages on the UI.

Link copied to clipboard
fun OkHttpClient.newSilentCall(request: Request): Call

Creates a 'silent' call when refresh token expires or SAML session expires, automatic re-authentication process will not be started.

Link copied to clipboard
fun OkHttpClient.removeDuplicateInterceptors(save: Boolean = true): OkHttpClient

Removes duplicate interceptors and network interceptors and save the result back to ClientProvider if save is true.

Link copied to clipboard
@JvmOverloads
fun OkHttpClient.removeInterceptor(interceptor: Interceptor, save: Boolean = true): OkHttpClient

Removes the interceptor identified by the type of the given interceptor from the current OkHttpClient, and save the result back to ClientProvider if save is true.

Link copied to clipboard
@JvmOverloads
fun <T : KClass<out Interceptor>> OkHttpClient.removeInterceptorByType(interceptorClazz: T, save: Boolean = true): OkHttpClient

Removes the interceptor of the given type interceptorClazz, and save it back to ClientProvider if save is true.

Link copied to clipboard
fun OkHttpClient.silent(): OkHttpClient

Clones the 'OkHttpClient' into a silent mode, this is only applicable for OAuth2 and SAML, and mostly be used for OData calls.

Properties

Link copied to clipboard
const val ALLOW_OPEN_URL: String