Snabble

object Snabble

The heart of the snabble SDK. Initialization and object access is provided via this facade.

Types

Link copied to clipboard

Enum describing the error types, which can occur during initialization of the SDK

Link copied to clipboard

Interface for notifying when our metadata is getting updated

Link copied to clipboard

Exception used for SDK initialization errors

Properties

Link copied to clipboard
val additionalMetadata: JsonObject?

Returns additional metadata that may be provided for apps unrelated to the SDK

Link copied to clipboard
lateinit var application: Application

The main Android application

Link copied to clipboard
lateinit var brands: Map<String, Brand>

Map of available brands

Link copied to clipboard

The current checked in project.

Link copied to clipboard

Sets the shop used for receiving store specific prices and identification in the payment process

Link copied to clipboard

Location manager for use with the check in manager

Link copied to clipboard

Geo-fencing based check in manager. Use for automatically detecting if you are in a shop.

Link copied to clipboard

Unique identifier, different over device installations

Link copied to clipboard
lateinit var config: Config

The config provided after calling Snabble.setup

Link copied to clipboard

Url to retrieve consent status of the user

Link copied to clipboard

Url to create a new app user

Link copied to clipboard

Weak reference to the current activity

Link copied to clipboard

Get the current checked in shop as a live data.

Link copied to clipboard

Set CustomProperty's to override the default behavior.

Link copied to clipboard

The current endpoint base url used by the SDK

Link copied to clipboard

The environment the SDK is using.

Link copied to clipboard

Get the error during initialization of the SDK occurred

Link copied to clipboard

Set to have PAYONE forms prefilled with the given data.

Link copied to clipboard

Url for generating payone web form authentication challenges

Link copied to clipboard

The current initialization state of the SDK. Fragments observe this state and only if the SDK is initialized will get displayed to the user.

Link copied to clipboard

Retrieve the global instance of snabble.

Link copied to clipboard

The internal storage directory in which snabble stores files

Link copied to clipboard

Set to take control over ShoppingCart.Item.isMergeable default behavior.

Link copied to clipboard

Returns true when the SDK is not compatible with the backend anymore and the app should notify the user that it will not function anymore.

Link copied to clipboard

The url where all the properties come from

Link copied to clipboard
lateinit var okHttpClient: OkHttpClient

OkHttpClient for general use.

Link copied to clipboard

List of certificates to match against user encrypted payment certificates. If those are not valid anymore, our backend is not able to decode the encrypted payment credentials anymore.

Link copied to clipboard

Add and retrieve local encrypted payment credentials

Link copied to clipboard
lateinit var projects: List<Project>

The list of available projects.

Link copied to clipboard
lateinit var receipts: Receipts

API-Wrapper to retrieve receipts

Link copied to clipboard

Url to retrieve receipts of the app user

Link copied to clipboard

Url for generating telecash web form authentication challenges

Link copied to clipboard

Url for generating telecash web form authentication challenges

Link copied to clipboard

Retrieve the link for our terms of service

Link copied to clipboard

Registry to retrieve and generate access tokens for backend api access

Link copied to clipboard

Local persisted user preferences

Link copied to clipboard
lateinit var users: Users

Access to user specific information, e.g. User-Consent / Unique-ID

Link copied to clipboard

Url to retrieve user related information

Link copied to clipboard

The version of the SDK

Link copied to clipboard

snabble SDK version name

Functions

Link copied to clipboard

Converts a relative url to a absolute url, depending on the environment.

Link copied to clipboard

Adds a listener that gets called every time the metadata updates

Link copied to clipboard
fun getProjectById(projectId: String?): Project?

Finds a project by it's id

Link copied to clipboard

Removes an already added listener

Link copied to clipboard

Enables debug logging

Link copied to clipboard
fun setup(app: Application? = null, config: Config? = null)

Setup the snabble SDK.

Link copied to clipboard
fun setupBlocking(app: Application, config: Config? = null)

The blocking version of .setup