Package cloud.pace.sdk.utils

Types

AuthenticationMode
Link copied to clipboard
enum AuthenticationMode : Enum<AuthenticationMode>
CallBackKt
Link copied to clipboard
class CallBackKt<T> : Callback<T>
Canceled
Link copied to clipboard
data class Canceled(data: Intent?) : IntentResult
CloudSDKKoinComponent
Link copied to clipboard
interface CloudSDKKoinComponent : KoinComponent
CompletableFutureCompat
Link copied to clipboard
class CompletableFutureCompat<V> : Future<V>

A backport of Java CompletableFuture which works with old Androids.

Completion
Link copied to clipboard
sealed class Completion<T>
Configuration
Link copied to clipboard
data class Configuration @JvmOverloads constructor(clientAppName: String, clientAppVersion: String, clientAppBuild: String, apiKey: String, checkRedirectScheme: Boolean, authenticationMode: AuthenticationMode, environment: Environment, extensions: List<String>, domainACL: List<String>, locationAccuracy: Int?, speedThresholdInKmPerHour: Int, geoAppsScope: String, appsDistanceThresholdInMeters: Int, oidConfiguration: CustomOIDConfiguration?)
DefaultDispatcherProvider
Link copied to clipboard
class DefaultDispatcherProvider : DispatcherProvider
DeviceUtils
Link copied to clipboard
object DeviceUtils

Utils for device attributes.

DispatcherProvider
Link copied to clipboard
interface DispatcherProvider
Environment
Link copied to clipboard
enum Environment : Enum<Environment>
Event
Link copied to clipboard
open class Event<out T>(content: T)

Used as a wrapper for data that is exposed via a LiveData that represents an event.

Failure
Link copied to clipboard
class Failure<T>(throwable: Throwable) : Completion<T>
IconUtils
Link copied to clipboard
object IconUtils
IntentResult
Link copied to clipboard
sealed class IntentResult
IntentResultResolverFragment
Link copied to clipboard
class IntentResultResolverFragment : Fragment
InvalidSpeed
Link copied to clipboard
object InvalidSpeed : Exception
KoinConfig
Link copied to clipboard
object KoinConfig
LocationProvider
Link copied to clipboard
interface LocationProvider
LocationProviderImpl
Link copied to clipboard
class LocationProviderImpl(context: Context, systemManager: SystemManager) : LocationProvider
LocationState
Link copied to clipboard
enum LocationState : Enum<LocationState>
NetworkError
Link copied to clipboard
object NetworkError : Exception
NoLocationFound
Link copied to clipboard
object NoLocationFound : Exception
Ok
Link copied to clipboard
data class Ok(data: Intent?) : IntentResult
PermissionDenied
Link copied to clipboard
object PermissionDenied : Exception
RunningCheck
Link copied to clipboard
object RunningCheck : Exception
SetupLogger
Link copied to clipboard
object SetupLogger
Success
Link copied to clipboard
class Success<T>(result: T) : Completion<T>
SystemManager
Link copied to clipboard
interface SystemManager
SystemManagerImpl
Link copied to clipboard
class SystemManagerImpl(context: Context) : SystemManager
Theme
Link copied to clipboard
enum Theme : Enum<Theme>
URL
Link copied to clipboard
object URL

Functions

asyncBackground
Link copied to clipboard
inline fun <T> asyncBackground(crossinline block: () -> T): Deferred<T>

Returns the future of an async coroutine on the Background context.

asyncIOBackground
Link copied to clipboard
inline fun <T> asyncIOBackground(crossinline block: () -> T): Deferred<T>

Returns the future of an async coroutine.

dispatchOnMainThread
Link copied to clipboard
inline fun dispatchOnMainThread(crossinline block: () -> Unit)

launch a new coroutine on the main thread if the block is not already called on the main thread. In that case, the code is just executed without the use of a coroutine.

enqueue
Link copied to clipboard
fun <T> Call<T>.enqueue(callback: CallBackKt<T>.() -> Unit)
equalsTo
Link copied to clipboard
fun <T> List<T>.equalsTo(other: List<T>): Boolean
getOIDConfiguration
Link copied to clipboard
fun Environment.getOIDConfiguration(clientId: String, clientSecret: String? = null, scopes: List<String>? = null, redirectUri: String, responseType: String = ResponseTypeValues.CODE, additionalParameters: Map<String, String>? = null, authorizationEndpoint: String? = null, endSessionEndpoint: String? = null, tokenEndpoint: String? = null, userInfoEndpoint: String? = null, integrated: Boolean = false): OIDConfiguration
getResultFor
Link copied to clipboard
suspend fun Activity.getResultFor(intent: Intent): IntentResult
suspend fun Fragment.getResultFor(intent: Intent): IntentResult
handleCallback
Link copied to clipboard
fun <T> Call<T>.handleCallback(completion: (Completion<T>) -> Unit)
@JvmName(name = "handleCallbackResult")
fun <T> Call<T>.handleCallback(completion: (Result<T>) -> Unit)
isNotNullOrBlank
Link copied to clipboard
inline fun CharSequence?.isNotNullOrBlank(): Boolean

Returns true if this nullable char sequence is not null or blank.

isNotNullOrEmpty
Link copied to clipboard
inline fun CharSequence?.isNotNullOrEmpty(): Boolean

Returns true if this nullable char sequence is not null or empty.

onBackgroundThread
Link copied to clipboard
inline fun onBackgroundThread(crossinline block: suspend () -> Unit): Job

launch a new coroutine on a background thread.

onCsvWriterThread
Link copied to clipboard
inline fun onCsvWriterThread(crossinline block: suspend () -> Unit): Job
onIOBackgroundThread
Link copied to clipboard
inline fun onIOBackgroundThread(crossinline block: suspend () -> Unit): Job

launch a new coroutine on a background thread.

onMainThread
Link copied to clipboard
inline fun onMainThread(crossinline block: suspend () -> Unit): Job

launch a new coroutine on the main thread.

onMainThreadNoInline
Link copied to clipboard
fun onMainThreadNoInline(block: suspend () -> Unit): Job

launch a new coroutine on the main thread without inlining.

randomHexString
Link copied to clipboard
fun String.Companion.randomHexString(length: Int): String
resumeIfActive
Link copied to clipboard
fun <T> CancellableContinuation<T>.resumeIfActive(value: T)

Resumes the execution of the corresponding coroutine if it is still active and passes value as the return value of the last suspension point.

resumeWithExceptionIfActive
Link copied to clipboard
fun <T> CancellableContinuation<T>.resumeWithExceptionIfActive(exception: Throwable)

Resumes the execution of the corresponding coroutine if it is still active so that the exception is re-thrown right after the last suspension point.

suspendCoroutineWithTimeout
Link copied to clipboard
inline suspend fun <T> suspendCoroutineWithTimeout(timeoutMillis: Long, crossinline block: (CancellableContinuation<T>) -> Unit): T

Runs a given suspending block of code inside a suspendCancellableCoroutine with a specified timeout and throws a TimeoutCancellationException if the timeout was exceeded.

toIso8601
Link copied to clipboard
fun Date.toIso8601(): String
toRfc3339Short
Link copied to clipboard
fun Date.toRfc3339Short(): String

Properties

dp
Link copied to clipboard
val Int.dp: Int

Converts integer to density-independent pixels (dp).

dp
Link copied to clipboard
val Float.dp: Int

Converts float to density-independent pixels (dp).

environment
Link copied to clipboard
val PACECloudSDK.environment: Environment
requestId
Link copied to clipboard
val <T> Response<T>.requestId: String?
requestId
Link copied to clipboard
val Response.requestId: String?
resourceUuid
Link copied to clipboard
val String.resourceUuid: String?

Returns the UUID of an URN or null.