getIncidentReportingURL

fun getIncidentReportingURL(context: Context, fairmaticOperationCallback: (String?, FairmaticErrorCode?) -> Unit?)

Retrieves the URL of the incident reporting web page.

The returned URL can be used to open the incident reporting page in an in-app browser or WebView. This URL should only be used if your app has already been granted permissions for camera, microphone, speech transcription, and location. If these permissions are not granted, it is recommended to use openIncidentReportingWebPage to open the page in the device's default browser.

The URL provided by this method is valid only for a limited time and should not be cached or stored for long-term use. Always fetch a fresh URL each time you need to open the incident reporting page in an in-app browser.

Parameters

context
  • Application context

fairmaticOperationCallback

Callback invoked on completion. Receives the URL string (if successful) and an optional error code. If successful, the URL will be non-null and the error will be null. If there is an error, the URL will be null and the error will contain a valid FairmaticErrorCode.

Note: Ensure the SDK is set up using setup before calling this method.