NCMBPush

class NCMBPush : NCMBObject

NCMBPush is used to retrieve and send the push notification.

NCMBPush can not add any field.

Information about the field names that can be set , refer to the following reference .

See also

Constructors

NCMBPush
Link copied to clipboard
fun NCMBPush()

Constructor

Types

Companion
Link copied to clipboard
object Companion

Functions

createIsoDate
Link copied to clipboard
fun createIsoDate(value: Date?): JSONObject?

create a date of mBaaS correspondence

delete
Link copied to clipboard
open fun delete()

Delete current NCMBObject from data store.

deleteInBackground
Link copied to clipboard
open fun deleteInBackground(deleteCallback: NCMBCallback)

Delete current NCMBObject from data store asynchronously.

fetch
Link copied to clipboard
open fun fetch()

Fetch current NCMBObject data from data store. Fetched result is reflect to this instance of object.

fetchInBackground
Link copied to clipboard
open fun fetchInBackground(fetchCallback: NCMBCallback)

Fetch current NCMBObject data from data store asynchronously.

get
Link copied to clipboard
fun get(key: String): Any?

get any type value to given key

getAcl
Link copied to clipboard
fun getAcl(): NCMBAcl
getArray
Link copied to clipboard
fun getArray(key: String, value: JSONArray? = null): JSONArray?

get JSONArray value from given key

getBoolean
Link copied to clipboard
fun getBoolean(key: String, value: Boolean? = null): Boolean?

get boolean value from given key

getCreateDate
Link copied to clipboard
fun getCreateDate(): Date?
getDate
Link copied to clipboard
fun getDate(key: String, value: Date? = null): Date?
getDouble
Link copied to clipboard
fun getDouble(key: String, value: Double? = null): Double?

get double value from given key

getGeo
Link copied to clipboard
fun getGeo(key: String): NCMBGeoPoint

get NCMBGeoPoint value from given key

getInt
Link copied to clipboard
fun getInt(key: String, value: Int? = null): Int?

get int value from given key

getJson
Link copied to clipboard
fun getJson(key: String, value: JSONObject? = null): JSONObject?

get JSONObject value from given key

getObjectId
Link copied to clipboard
fun getObjectId(): String?
getSearchCondition
Link copied to clipboard
fun getSearchCondition(): JSONObject?

Get search condition

getString
Link copied to clipboard
open fun getString(key: String, value: String? = null): String?

get string value from given key

getUpdateDate
Link copied to clipboard
fun getUpdateDate(): Date?
isContainsKey
Link copied to clipboard
fun isContainsKey(key: String?): Boolean

Check key is in keys

put
Link copied to clipboard
fun put(key: String, value: Any)

put any type value to given key

richPushHandler
Link copied to clipboard
fun richPushHandler(context: Context?, intent: Intent?)

Do display the webview when an URL is containted in the payload data

save
Link copied to clipboard
open override fun save()

Send push object

saveInBackground
Link copied to clipboard
open fun saveInBackground(saveCallback: NCMBCallback)

Save current NCMBObject to data store asynchronously

setAcl
Link copied to clipboard
fun setAcl(acl: NCMBAcl)
setCreateDate
Link copied to clipboard
open fun setCreateDate(createDate: Date)
setDeliveryTimeString
Link copied to clipboard
open fun setDeliveryTimeString(value: String, timeZone: TimeZone? = null)

Set delivery time as a character string. Type of string to set is "yyyy-MM-dd HH:mm:ss". An example is "2022-02-03 12:34:56". Also, The registered value is {"iso":"yyyy-MM-ddTHH:mm:ss.000Z","__type":"Date"}.

setObjectId
Link copied to clipboard
fun setObjectId(objectId: String)
setPushLocalData
Link copied to clipboard
fun setPushLocalData(data: JSONObject)

Set data to instance

setSearchCondition
Link copied to clipboard
fun setSearchCondition(query: NCMBQuery<NCMBInstallation>)

Set search condition

trackAppOpened
Link copied to clipboard
fun trackAppOpened(intent: Intent?)

Open push registration in background

Properties

ACCESS_CONTROL_LIST
Link copied to clipboard
val ACCESS_CONTROL_LIST: String

ACL

deliveryExpirationDate
Link copied to clipboard
var deliveryExpirationDate: Date?

Set delivery expiration date The argument is the time based on default time zone of the device.

deliveryExpirationTime
Link copied to clipboard
var deliveryExpirationTime: String?

Set delivery expiration time The argument is numbers + half-width spaces + hour or day. For Example, 「3 hour」,「5 day」

deliveryTime
Link copied to clipboard
var deliveryTime: Date?

Set delivery date The argument is the time based on default time zone of the device.

immediateDeliveryFlag
Link copied to clipboard
var immediateDeliveryFlag: Boolean?

Set badge increment flag

isSendToAndroid
Link copied to clipboard
var isSendToAndroid: Boolean = false
isSendToIOS
Link copied to clipboard
var isSendToIOS: Boolean = false
keys
Link copied to clipboard
var keys: HashSet<String>
message
Link copied to clipboard
var message: String?

Set push message

richUrl
Link copied to clipboard
var richUrl: String?

Set richUrl

target
Link copied to clipboard
var target: ArrayList<String>
title
Link copied to clipboard
var title: String?

Set push title