---
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


---

# NowPushSDK class - Android

# NowPushSDK class - Android {#ariaid-title1}

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

The NowPushSDK class provides the function necessary to create a
`NowPushService` that enables the sending of unsolicited (push) notifications
to Android devices.

## NowPushSDK - makePushService(instanceURL: URL) {#ariaid-title2}

Creates a NowPush service.
{#NPushSDK-makePushService_S_O_O__table_tzv_sxj_nrb__entry__3}

| Name | Type | Description |
|-|-|-|
| instanceURL | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | URL of the ServiceNow instance that the NowPushService should interact with. |
[Table 1. Parameters]

{#NPushSDK-makePushService_S_O_O__table_tzv_sxj_nrb} {#NPushSDK-makePushService_S_O_O__table_uzv_sxj_nrb__entry__2}

| Type | Description |
|-|-|
| Result\<NowPushService\> | NowPushService object wrapped in a [Kotlin Result object](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/). |
[Table 2. Returns]

{#NPushSDK-makePushService_S_O_O__table_uzv_sxj_nrb}  
This example shows how to setup to makePushService() method to create
the Push Service.

    private var nowPushService: NowPushService? = null

    /**
      * Create the NowPushService once in the lifetime of the application inside the Application
      * class or another manager class that will be injected into other classes via dagger/hilt.
      * NowPushService should be created after initializing the NowSDK.
      */
    suspend fun getNowPushService(): NowPushService? {
      if (nowPushService != null) return nowPushService

      return NowPushSDK.makePushService(URL("https://instance-name.service-now.com")).getOrThrow()
        .also { this.nowPushService = it }
    }


