# createForNSDKResult Source: https://www.nianticspatial.com/docs/api/kotlin/com.nianticspatial.nsdk.utils.FlowPollingManager.createForNSDKResult/ createForNSDKResult --- ## Declaration fun createForNSDKResult( pollingIntervalMs: Long, pollFunction: () -> NSDKResult, frameIdExtractor: ((T) -> Long)? = null ): FlowPollingManager> #### Summary Creates a FlowPollingManager specifically for ARDKResult types, reducing boilerplate code. This helper automatically handles ARDKResult.Success and ARDKResult.Error cases: - Success results are deduplicated based on frameIdExtractor - Error results are emitted when they differ from the previous result, so a change from one error to another is reported, but the same error is not repeated on every poll ### Parameters | Name | Type | Summary | | --- | --- | --- | | pollingIntervalMs | Long | Interval between polling attempts in milliseconds | | pollFunction | () -> NSDKResult | Function that returns ARDKResult | | frameIdExtractor | ((T) -> Long)? | Function to extract frame ID from Success value. Should return 0L for Error cases. | ---