Class BlukiiCloud
You can get a BlukiiCloud
object via BlukiiController.getCloud()
.
With a blukii cloud object you have access to the cloud state. You can set credentials, get the user role, check if the user is authenticated and you can do the login and logout.
Note: The API key has to be created in your blukii Manager Account. Basic permissions are for free. Further permissions must be purchased from blukii. Please contact support@blukii.com for more information.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The listener interface fo receiving state changes oflogin(OnLoginListener)
. -
Method Summary
Modifier and TypeMethodDescriptionGets the role of an authenticated user.boolean
Checks if the user is logged in.void
login
(BlukiiCloud.OnLoginListener listener) Do login with before set credentials and API key.void
logout()
Do logout.void
Deprecated.void
setCredentials
(String user, String password) Sets the user credentials.
-
Method Details
-
setCredentials
Sets the user credentials.These are needed for sdk functions that transfers user assigned data with blukii Manager.
- Parameters:
user
- user's usernamepassword
- user's password
-
setApiKey
Deprecated.As of release 4.0.0, Please provide your api key instead via Manifest (seeBlukiiController
for more information)Sets the API key.This is needed for every sdk function that needs to interact with blukii Manager.
The API key has to be purchased from blukii. Please contact support@blukii.com for more information.
- Parameters:
apiKey
- developer's API key
-
getUserRole
Gets the role of an authenticated user.- Returns:
- the
BlukiiCloudUserRole
-
isAuthenticated
public boolean isAuthenticated()Checks if the user is logged in.- Returns:
true
if user is authenticated, otherwisefalse
-
login
Do login with before set credentials and API key.- Parameters:
listener
-BlukiiCloud.OnLoginListener
which listens if login was successful or an error occurred.- See Also:
-
logout
public void logout()Do logout.After this method call, user is no longer authenticated.
-
BlukiiController
for more information)