putLong

open fun putLong(key: String, value: Long): TagsBundle.Builder

Adds a tag with a long value.

Use for timestamps (registration date, last activity), large numeric IDs (user ID, transaction ID), or any numeric value that exceeds the integer range. Long values can store numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Example (News App):


		long now = System.currentTimeMillis();
		new TagsBundle.Builder()
		    .putLong("user_id", 9876543210L)
		    .putLong("registered_at", now)
		    .putLong("last_article_read", now - 3600000) // 1 hour ago
		    .putLong("subscription_id", 1234567890123L)
		    .build();
		

Return

this Builder instance for method chaining

Parameters

key

tag name (e.g., "user_id", "registered_at", "last_login")

value

long value to store