<div class='sourceset sourceset-android'>Android</div>

```kotlin
public abstract class RemoteLong internal constructor() : BaseRemoteState<Long>()
```

Abstract base class for all remote long representations. This class extends [RemoteState<Long>].

## Companion Object

#### Methods

<h2 id="invoke-v">invoke</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        public operator fun invoke(v: Long): RemoteLong
```

Creates a [RemoteLong](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteLong) instance from a constant `Long` value. This value will be added as
a constant to the remote document.

#### Parameters

| | |
| --- | --- |
| v | The constant `Long` value. |

#### Returns

| | |
| --- | --- |
|  | A [MutableRemoteLong](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/MutableRemoteLong) representing the constant value. |

<hr class="docs-overload-divider">

<h2 id="createnamedremotelong-name-defaultvalue-domain">createNamedRemoteLong</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        @JvmStatic
        public fun createNamedRemoteLong(
            name: String,
            defaultValue: Long,
            domain: RemoteState.Domain = RemoteState.Domain.User,
        ): RemoteLong
```

Creates a named [RemoteLong](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteLong) with an initial value. Named remote longs can be set via
AndroidRemoteContext.setNamedLong.

#### Parameters

| | |
| --- | --- |
| name | The unique name for this remote long. |
| defaultValue | The initial `Long` value for the named remote long. |
| domain | The domain of the named long (defaults to [RemoteState.Domain.User](/jetpack-compose/androidx.compose.remote/remote-creation-compose/objects/RemoteState.Domain.User)). |

#### Returns

| | |
| --- | --- |
|  | A [RemoteLong](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteLong) representing the named long. |