public class Configuration extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
allowInvalidSSLCertificate(boolean allowInvalidSSLCertificate)
Tell the system to trust the SSL certificate of the server (even though the Authority is not valid)
|
String |
currentEmailAccount()
Return user email of credentials previously provided with
setApiKey(String, String) , setUserPass(String, String)
or declared in the Android Manifest |
long |
getCacheMaxAge()
Get the maximum age of a cached response.
|
String |
getDashboardURL()
Obtains the currently Dashboard url used
|
boolean |
isAllowInvalidSSLCertificate()
Returns true if all SSL certificates are trusted
|
boolean |
setApiKey(String email,
String apiKey)
Provides your API key to the Situm SDK for Android.
|
boolean |
setCacheMaxAge(long maxAge,
TimeUnit timeUnit)
Sets the maximum age of a cached response.
|
void |
setDashboardURL(String url)
Set the Dashboard URL used by the SDK
|
boolean |
setUserPass(String email,
String password)
Provides user's email and password.
|
public boolean setApiKey(String email, String apiKey)
email
- email that identifies the account. Can't be empty.apiKey
- key obtained at situm.es. Can't be emptyIllegalArgumentException
- if email or apiKey are null or emptypublic String currentEmailAccount()
setApiKey(String, String)
, setUserPass(String, String)
or declared in the Android Manifestpublic boolean setUserPass(String email, String password)
email
- user's email. Can't be empty.password
- user's password. Can't be empty.IllegalArgumentException
- if email or password are null or emptypublic boolean allowInvalidSSLCertificate(boolean allowInvalidSSLCertificate)
allowInvalidSSLCertificate
- if true, communications with the server may not be securepublic boolean isAllowInvalidSSLCertificate()
public String getDashboardURL()
public void setDashboardURL(String url)
url
- the new Dashboard url. It will do nothing if is null.public long getCacheMaxAge()
public boolean setCacheMaxAge(long maxAge, TimeUnit timeUnit)
maxAge
- a non-negative integerIllegalArgumentException
- if timeUnit is null or maxAge is less than zero