Package com.blukii.sdk.cloud
Klasse BlukiiCloud
java.lang.Object
com.blukii.sdk.cloud.BlukiiCloud
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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interfaceThe listener interface fo receiving state changes oflogin(OnLoginListener). -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGets 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.voidsetCredentials(String user, String password) Sets the user credentials.voidSets the user for the data sync
-
Methodendetails
-
setCredentials
Sets the user credentials.These are needed for sdk functions that transfers user assigned data with blukii Manager.
- Parameter:
user- user's usernamepassword- user's password
-
setRunas
Sets the user for the data syncThis can only be set, if a user is logged in as admin. See
getUserRole()- Parameter:
runas- blukii manager username (email)
-
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:
trueif user is authenticated, otherwisefalse
-
login
Do login with before set credentials and API key.- Parameter:
listener-BlukiiCloud.OnLoginListenerwhich 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.
-