---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowPushSDK クラス : Android

# NowPushSDK クラス : Android {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：1分

NowPushSDK クラスは、Androidデバイスへの一方的な (プッシュ) 通知の送信を可能にする `NowPushService` を作成するために必要な関数を提供します。

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

NowPush サービスを作成します。
{#NPushSDK-makePushService_S_O_O__table_tzv_sxj_nrb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceurl | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | NowPushService がやり取りする必要がある ServiceNow インスタンスの URL。 |
[表 : 1. パラメーター]

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

| タイプ | 説明 |
|-|-|
| 結果\<NowPushService\> | [Kotlin Result オブジェクト](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/)にラップされた NowPushService オブジェクト。 |
[表 : 2. 返される内容]

{#NPushSDK-makePushService_S_O_O__table_uzv_sxj_nrb}  
この例では、 makePushService() メソッドをセットアップしてプッシュサービスを作成する方法を示します。

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


