FirebaseFirestoreSettings.Builder

class FirebaseFirestoreSettings.Builder


A Builder for creating FirebaseFirestoreSettings.

Summary

Public constructors

Constructs a new FirebaseFirestoreSettings Builder object.

Constructs a new FirebaseFirestoreSettings Builder based on an existing FirebaseFirestoreSettings object.

Public functions

FirebaseFirestoreSettings
Boolean

This function is deprecated.

Instead, build the FirebaseFirestoreSettings instance to check the SDK cache configurations.

Boolean
FirebaseFirestoreSettings.Builder

Specifies the cache used by the SDK.

FirebaseFirestoreSettings.Builder

This function is deprecated.

Instead, use setLocalCacheSettings to configure SDK cache.

FirebaseFirestoreSettings.Builder

Enables or disables SSL for communication.

Public properties

Long
String!

Public constructors

Builder

Builder()

Constructs a new FirebaseFirestoreSettings Builder object.

Builder

Builder(settings: FirebaseFirestoreSettings)

Constructs a new FirebaseFirestoreSettings Builder based on an existing FirebaseFirestoreSettings object.

Public functions

isPersistenceEnabled

fun isPersistenceEnabled(): Boolean
Returns
Boolean

boolean indicating whether local persistent storage is enabled or not.

isSslEnabled

fun isSslEnabled(): Boolean
Returns
Boolean

boolean indicating whether SSL is enabled or not.

setLocalCacheSettings

fun setLocalCacheSettings(settings: LocalCacheSettings): FirebaseFirestoreSettings.Builder

Specifies the cache used by the SDK. Available options are PersistentCacheSettings and MemoryCacheSettings, each with different configuration options.

When unspecified, PersistentCacheSettings will be used by default.

NOTE: Calling this setter and setPersistenceEnabled() or setCacheSizeBytes() at the same time will throw an exception during SDK initialization. Instead, use the configuration in the PersistentCacheSettings object to specify the cache size.

Returns
FirebaseFirestoreSettings.Builder

A settings object on which the cache settings is configured as specified by the given settings.

setPersistenceEnabled

fun setPersistenceEnabled(value: Boolean): FirebaseFirestoreSettings.Builder

Enables or disables local persistent storage. The default is to use local persistent storage.

Returns
FirebaseFirestoreSettings.Builder

A settings object that uses local persistent storage as specified by the given value.

setSslEnabled

fun setSslEnabled(value: Boolean): FirebaseFirestoreSettings.Builder

Enables or disables SSL for communication. The default is to use SSL.

Returns
FirebaseFirestoreSettings.Builder

A settings object that uses SSL as specified by the value.

Public properties

cacheSizeBytes

var cacheSizeBytesLong

host

var hostString!