Class

RemoteLong

Abstract base class for all remote long representations.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public abstract class RemoteLong internal constructor() : BaseRemoteState<Long>()

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

Companion Object

Methods

invoke

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

Creates a 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 representing the constant value.

createNamedRemoteLong

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

Creates a named 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).

Returns

A RemoteLong representing the named long.