---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowWebViewServiceDelegate interface - Android

# NowWebViewServiceDelegate interface - Android {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The NowWebViewServiceDelegate API provides callbacks for
notification of issues within the NowWebService processing such as when a
flow ends or a navigation fails.

## NowWebViewServiceDelegate - flowEnded(flowName: String?) {#ariaid-title2}

Callback that notifies the host application that the specified flow has
ended.
{#NWVSD-flowEnded_S__table_lbq_l5s_sqb__entry__3}

| Name | Type | Description |
|-|-|-|
| flowName | String | Name of the flow that ended. |
[Table 1. Parameters]

{#NWVSD-flowEnded_S__table_lbq_l5s_sqb} {#NWVSD-flowEnded_S__table_mbq_l5s_sqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 2. Returns]

{#NWVSD-flowEnded_S__table_mbq_l5s_sqb}  
The following code example shows how to call this function.

    suspend fun getNowWebService(): NowWebService {
      return NowWebSDK.makeWebService(URL("https://instance-name.service-now.com"), object : NowWebViewServiceDelegate {
        override fun flowEnded(activity: Activity, flowName: String?) {
          Log.i("NowWebSdk", "flow ended")
        }
      }).getOrThrow()
    }

## NowWebViewServiceDelegate - navigationFailed(error : String) {#ariaid-title3}

Callback that notifies the host application that navigation has failed with the
specified error reason.
{#NWVSD-navigationFailed_S__table_v5g_w5s_sqb__entry__3}

| Name | Type | Description |
|-|-|-|
| error | String | Error that describes why the navigation failed. |
[Table 3. Parameters]

{#NWVSD-navigationFailed_S__table_v5g_w5s_sqb} {#NWVSD-navigationFailed_S__table_w5g_w5s_sqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 4. Returns]

{#NWVSD-navigationFailed_S__table_w5g_w5s_sqb}  
The following code example shows how to call this function.

    suspend fun getNowWebService(): NowWebService {
      return NowWebSDK.makeWebService(URL("https://instance-name.service-now.com"), object : NowWebViewServiceDelegate {
        override fun navigationFailed(activity: Activity, error: String) {
          Log.i("NebWebSdk", "navigation failed")
        }
      }).getOrThrow()
    }

## NowWebViewServiceDelegate - requestedDismissal() {#ariaid-title4}

Callback that notifies the host application that the screen should be
dismissed.
{#NWVSD-requestedDismissal__table_gxw_1ws_sqb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 5. Parameters]

{#NWVSD-requestedDismissal__table_gxw_1ws_sqb} {#NWVSD-requestedDismissal__table_hxw_1ws_sqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 6. Returns]

{#NWVSD-requestedDismissal__table_hxw_1ws_sqb}  
The following code example shows how to call this function.

    suspend fun getNowWebService(): NowWebService {
      return NowWebSDK.makeWebService(URL("https://instance-name.service-now.com"), object : NowWebViewServiceDelegate {
        override fun requestedDismissal(activity: Activity) {
          Log.i("NebWebSdk", "screen should be dismissed")
        }
      }).getOrThrow()
    }

## NowWebViewServiceDelegate - unsupportedUrl(uri: Uri) {#ariaid-title5}

Callback that notifies the host application that the provided URL is
unsupported.
{#NWVSD-unsupportedUrl_S__table_tn3_hvs_sqb__entry__3}

| Name | Type | Description |
|-|-|-|
| uri | Uri | URL that is unsupported. |
[Table 7. Parameters]

{#NWVSD-unsupportedUrl_S__table_tn3_hvs_sqb} {#NWVSD-unsupportedUrl_S__table_un3_hvs_sqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 8. Returns]

{#NWVSD-unsupportedUrl_S__table_un3_hvs_sqb}  
The following code example shows how to call this function.

    suspend fun getNowWebService(): NowWebService {
      return NowWebSDK.makeWebService(URL("https://instance-name.service-now.com"), object : NowWebViewServiceDelegate {
        override fun unsupportedUrl(activity: Activity, uri: Uri) {
          Log.i("NebWebSdk", "URL is unsupported")
        }
      }).getOrThrow()
    }


