Klasse 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.

  • Methodendetails

    • 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.

      Parameter:
      user - user's username
      password - user's password
    • setRunas

      public void setRunas(String runas)
      Sets the user for the data sync

      This can only be set, if a user is logged in as admin. See getUserRole()

      Parameter:
      runas - blukii manager username (email)
    • getUserRole

      public BlukiiCloudUserRole getUserRole()
      Gets the role of an authenticated user.
      Gibt zurück:
      the BlukiiCloudUserRole
    • isAuthenticated

      public boolean isAuthenticated()
      Checks if the user is logged in.
      Gibt zurück:
      true if user is authenticated, otherwise false
    • login

      public void login(BlukiiCloud.OnLoginListener listener)
      Do login with before set credentials and API key.
      Parameter:
      listener - BlukiiCloud.OnLoginListener which listens if login was successful or an error occurred.
      Siehe auch:
    • logout

      public void logout()
      Do logout.

      After this method call, user is no longer authenticated.