getTag
[androidJvm]\
fun getTag(key: String): Flow<Tags?>
Gets the tag attached to this install.
Return
the tag associated with this install. Will return NULL if tag does not exist
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | val fancyAnnouncement = "FancyAnnouncement"
Contextual.registerGuideBlock(fancyAnnouncement).observe(this){ contextualContainer ->
CoroutineScope(Dispatchers.IO).launch {
contextualContainer.tagManager.getTag("ProductOffer").collectLatest {
val taggedStringValue = tags?.tagStringValue // Get the tag value. Will be NULL if tag value is other types
val tagIntegerValue = tags?.tagIntegerValue // Get the tag value. Will be NULL if tag value is other types
val taggedDateTimeValue = tags?.tagDateTime // Get the tag value. Will be NULL if tag value is other types
val createdDate = tags?.createdDate // Get the tag created date time
val installId = tags?.installId // Get the install ID associated with this tag
}
}
}
|
Last update:
2024-02-15