Settings

object Settings

This is companion object for NCMB class.

This companion object contains main Settings for Kotlin SDK.

Functions

getApiBaseUrl
Link copied to clipboard
fun getApiBaseUrl(isScript: Boolean = false): String

This method is to get API BASE URL.

getApplicationKey
Link copied to clipboard
fun getApplicationKey(): String

This method is to get set application key.

getClientKey
Link copied to clipboard
fun getClientKey(): String

This method is to get set client key.

getCurrentContext
Link copied to clipboard
fun getCurrentContext(): Context?

This method is to get Current context

getSessionToken
Link copied to clipboard
fun getSessionToken(): String?

This method is to get current sessionToken.

getTimeOut
Link copied to clipboard
fun getTimeOut(): Int

This method is to get API TIMEOUT.

initialize
Link copied to clipboard
fun initialize(context: Context, applicationKey: String, clientKey: String, domainUrl: String = DEFAULT_DOMAIN_URL, apiVersion: String = DEFAULT_API_VERSION, scriptDomainUrl: String = DEFAULT_SCRIPT_DOMAIN_URL, scriptApiVersion: String = DEFAULT_SCRIPT_API_VERSION)

SDK initialize method. Which set Application Key, Client Key to connect to NCMB server.

initializePush
Link copied to clipboard
fun initializePush(context: Context)

SDK initialize method to use push. This method do get device token and register to NCMB server for the first time. For second times or more to be executed, it will retrieve the device token and update registered installation (which represents by currentInstallation)

setTimeOut
Link copied to clipboard
fun setTimeOut(timeout: Int)

This method is to set API TIMEOUT.

Properties

API_BASE_URL
Link copied to clipboard
var API_BASE_URL: String
APPLICATION_KEY
Link copied to clipboard
var APPLICATION_KEY: String
CLIENT_KEY
Link copied to clipboard
var CLIENT_KEY: String
CURRENT_CONTEXT
Link copied to clipboard
var CURRENT_CONTEXT: Context? = null
DEFAULT_API_TIMEOUT
Link copied to clipboard
const val DEFAULT_API_TIMEOUT: Int = 10000

Default API timeout

DEFAULT_API_VERSION
Link copied to clipboard
const val DEFAULT_API_VERSION: String

Default API version

DEFAULT_DOMAIN_URL
Link copied to clipboard
const val DEFAULT_DOMAIN_URL: String

Default base URL of API

DEFAULT_SCRIPT_API_VERSION
Link copied to clipboard
const val DEFAULT_SCRIPT_API_VERSION: String

script API version

DEFAULT_SCRIPT_DOMAIN_URL
Link copied to clipboard
const val DEFAULT_SCRIPT_DOMAIN_URL: String

script end point

METADATA_PREFIX
Link copied to clipboard
const val METADATA_PREFIX: String

Prefix of keys in metadata for NCMB settings

OAUTH_ANONYMOUS
Link copied to clipboard
const val OAUTH_ANONYMOUS: String

Anonymous authentication

OAUTH_FACEBOOK
Link copied to clipboard
const val OAUTH_FACEBOOK: String

OAuth type of Facebook

OAUTH_GOOGLE
Link copied to clipboard
const val OAUTH_GOOGLE: String

OAuth type of Google

OAUTH_TWITTER
Link copied to clipboard
const val OAUTH_TWITTER: String

OAuth type of Twitter

SCRIPT_API_BASE_URL
Link copied to clipboard
var SCRIPT_API_BASE_URL: String
SDK_NAME
Link copied to clipboard
const val SDK_NAME: String

Name of this SDK

SDK_VERSION
Link copied to clipboard
const val SDK_VERSION: String

Version of this SDK

SESSION_TOKEN
Link copied to clipboard
var SESSION_TOKEN: String? = null
TIMEOUT
Link copied to clipboard
var TIMEOUT: Int = 0
USER_ID
Link copied to clipboard
var USER_ID: String?