Stay organized with collections
Save and categorize content based on your preferences.
object FakeCameraIds
Utility for tracking and generating fake CameraId instances for testing.
Generated camera IDs are prefixed with "FakeCamera-" to ensure they are non-numerical. This helps identify code that incorrectly assumes camera IDs are parsable as integers (e.g., assuming camera ID "0" can be parsed to 0).
Summary
Public properties |
CameraId |
A default fake CameraId instance ("FakeCamera-default").
|
Public functions
fun next(): CameraId
Generates a new, unique fake CameraId.
The generated ID will have the format "FakeCamera-{index}", where index is a monotonically increasing integer starting from 0.
Public properties
val default: CameraId
A default fake CameraId instance ("FakeCamera-default").
Use this when a test only needs a single camera ID and uniqueness across different components is not required.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-12 UTC."],[],[]]