public enum PrivatelyCore extends java.lang.Enum<PrivatelyCore>
Modifier and Type | Class and Description |
---|---|
static interface |
PrivatelyCore.AuthenticationCallback
Interface for the callback executed when the authentication call completes.
|
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(java.lang.String apiKey,
java.lang.String secretKey,
PrivatelyCore.AuthenticationCallback callback)
Authenticate the library and any Privately SDKs.
|
java.lang.String |
getApiKey() |
void |
init(Context context)
Initialisation, must be called before using any method on the instance.
|
boolean |
isAuthenticated() |
static PrivatelyCore |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PrivatelyCore[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PrivatelyCore INSTANCE
public static PrivatelyCore[] values()
for (PrivatelyCore c : PrivatelyCore.values()) System.out.println(c);
public static PrivatelyCore valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void init(Context context)
context
- public void authenticate(java.lang.String apiKey, java.lang.String secretKey, PrivatelyCore.AuthenticationCallback callback) throws java.lang.IllegalStateException
apiKey
- The client API key.secretKey
- The client secret.callback
- A callback executed when the authentication call completes.java.lang.IllegalStateException
- when the instance hasn't been initialised.public boolean isAuthenticated()
public java.lang.String getApiKey()