NotificationIdGenerator

An auto-incrementing notification ID generator.

Functions

Link copied to clipboard

Get the range.

Link copied to clipboard

Get the start value.

Link copied to clipboard
fun nextId(context: Context): Int

Store the next ID.

Link copied to clipboard
fun setRange(context: Context, @IntRange(from = 0, to = 50) newRange: Int)

Set the number of notifications to display (max range). Implicitly resets the current id to .getStart.

Link copied to clipboard
fun setStart(context: Context, value: Int)

Set the count and start value.