Class AerisEngine

    • Constructor Detail

      • AerisEngine

        public AerisEngine()
    • Method Detail

      • initWithKeys

        public static void initWithKeys​(String clientId,
                                        String clientSecret,
                                        android.content.Context context)
        Intializes the engine with client id, client secret, and app package name for the app ID.
        Parameters:
        clientId - the client id given by Aeris.
        clientSecret - the client secret given by Aeris.
        context - Needed to grab the package name.
      • initPermissions

        public void initPermissions​(android.content.Context context)
      • initWithKeys

        public static void initWithKeys​(String clientId,
                                        String clientSecret,
                                        String appId)
        Initializes the engine with client id, client secret, and app package name for the app ID.
        Parameters:
        clientId - the client id given by Aeris.
        clientSecret - the client secret given by Aeris.
        appId - App id of the project using the lib.
      • setDebugLogcatEnabled

        public void setDebugLogcatEnabled​(boolean enabled)
        Sets whether all requests/responses should be output to the logcat. Default is false.Each request can be turned on specifically as well.
        Parameters:
        enabled - if debug should be enabled.
      • isDebugLogcatEnabled

        public boolean isDebugLogcatEnabled()
        Returns true if debug logcat is enabled for all requests/responses. Default if false.
        Returns:
        true if debug is enabled.
      • getClientId

        public String getClientId()
        Get the client id.
        Returns:
        the client id.
      • getClientSecret

        public String getClientSecret()
        Get the client secret.
        Returns:
        the client secret.
      • getAppId

        public String getAppId()
        Get the App id.
        Returns:
        app id, the package name of the project.
      • setUnits

        public void setUnits​(AerisEngine.Units unit,
                             android.content.Context context)
        Helper within the engine to set the units to an Android preference. Currently only STANDARD, METRIC supported.
        Parameters:
        unit - Unit type to set as.
        context - context to use for preference.
      • isStandardUnits

        public boolean isStandardUnits​(android.content.Context context,
                                       boolean defaultVal)
        Helper within the engine to get if standard has been set as a preference.
        Parameters:
        context - context to use.
        defaultVal - default value if an android preference has not been set.
        Returns:
        true if in standard units
      • getPermissions

        public AerisPermissions getPermissions()
        Returns the current Aeris permissions if they have been obtained through the API. This is done automatically on application startup. If they have not been obtained for some reason, it will use default settings.
        Returns:
        The permissions.
      • setPermissions

        public void setPermissions​(AerisPermissions permissions)
        Sets the permissions. This will not be stored to a preference as the the ones retrieved by the Aeris API will be.
        Parameters:
        permissions - permissions to use.