Class BlukiiCloud

java.lang.Object
com.blukii.sdk.cloud.BlukiiCloud

public final class BlukiiCloud extends Object
This class is the main controller for blukii cloud based actions.

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.

  • Method Details

    • setCredentials

      public void setCredentials(String user, String password)
      Sets the user credentials.

      These are needed for sdk functions that transfers user assigned data with blukii Manager.

      Parameters:
      user - user's username
      password - user's password
    • setApiKey

      @Deprecated public void setApiKey(String apiKey)
      Deprecated.
      As of release 4.0.0, Please provide your api key instead via Manifest (see BlukiiController 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

      public BlukiiCloudUserRole 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, otherwise false
    • login

      public void login(BlukiiCloud.OnLoginListener listener)
      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.