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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe listener interface fo receiving state changes oflogin(OnLoginListener). -
Method Summary
Modifier and TypeMethodDescriptionGets the role of an authenticated user.booleanChecks if the user is logged in.voidlogin(BlukiiCloud.OnLoginListener listener) Do login with before set credentials and API key.voidlogout()Do logout.voidDeprecated.voidsetCredentials(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 (seeBlukiiControllerfor 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:
trueif user is authenticated, otherwisefalse
-
login
Do login with before set credentials and API key.- Parameters:
listener-BlukiiCloud.OnLoginListenerwhich 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.
-
BlukiiControllerfor more information)