Class PropertyConfigurator

  • All Implemented Interfaces:
    com.microsoft.appcenter.channel.Channel.Listener

    public class PropertyConfigurator
    extends com.microsoft.appcenter.channel.AbstractChannelListener
    Allow overriding Part A properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void collectDeviceId()
      Enable collection of the Android device identifier for this target.
      void onPreparingLog​(com.microsoft.appcenter.ingestion.models.Log log, java.lang.String groupName)
      Override or inherit common schema properties while preparing log.
      void removeEventProperty​(java.lang.String key)
      Removes the given key from the common event properties.
      void setAppLocale​(java.lang.String appLocale)
      Override common schema Part A property App.Locale.
      void setAppName​(java.lang.String appName)
      Override common schema Part A property App.Name.
      void setAppVersion​(java.lang.String appVersion)
      Override common schema Part A property App.Version.
      void setEventProperty​(java.lang.String key, boolean value)
      Add or overwrite the given key for the common event properties.
      void setEventProperty​(java.lang.String key, double value)
      Add or overwrite the given key for the common event properties.
      void setEventProperty​(java.lang.String key, long value)
      Add or overwrite the given key for the common event properties.
      void setEventProperty​(java.lang.String key, java.lang.String value)
      Add or overwrite the given key for the common event properties.
      void setEventProperty​(java.lang.String key, java.util.Date value)
      Add or overwrite the given key for the common event properties.
      void setUserId​(java.lang.String userId)
      Set the user identifier.
      • Methods inherited from class com.microsoft.appcenter.channel.AbstractChannelListener

        onClear, onGloballyEnabled, onGroupAdded, onGroupRemoved, onPaused, onPreparedLog, onResumed, shouldFilter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onPreparingLog

        public void onPreparingLog​(@NonNull
                                   com.microsoft.appcenter.ingestion.models.Log log,
                                   @NonNull
                                   java.lang.String groupName)
        Override or inherit common schema properties while preparing log.
        Specified by:
        onPreparingLog in interface com.microsoft.appcenter.channel.Channel.Listener
        Overrides:
        onPreparingLog in class com.microsoft.appcenter.channel.AbstractChannelListener
        Parameters:
        log - A log.
        groupName - The group name.
      • setAppName

        public void setAppName​(java.lang.String appName)
        Override common schema Part A property App.Name.
        Parameters:
        appName - App name.
      • setAppVersion

        public void setAppVersion​(java.lang.String appVersion)
        Override common schema Part A property App.Version.
        Parameters:
        appVersion - App version.
      • setAppLocale

        public void setAppLocale​(java.lang.String appLocale)
        Override common schema Part A property App.Locale.
        Parameters:
        appLocale - App Locale.
      • setUserId

        public void setUserId​(java.lang.String userId)
        Set the user identifier. The user identifier needs to start with the c: prefix or must not have a prefix. If the prefix is missing, the c: prefix will be automatically added. The userId cannot be empty or just "c:".
        Parameters:
        userId - user identifier.
      • setEventProperty

        public void setEventProperty​(java.lang.String key,
                                     boolean value)
        Add or overwrite the given key for the common event properties. Properties will be inherited by children of this transmission target.
        Parameters:
        key - The property key. The key must not be null.
        value - The boolean value.
      • setEventProperty

        public void setEventProperty​(java.lang.String key,
                                     java.util.Date value)
        Add or overwrite the given key for the common event properties. Properties will be inherited by children of this transmission target.
        Parameters:
        key - The property key. The key must not be null.
        value - The date value. The value cannot be null.
      • setEventProperty

        public void setEventProperty​(java.lang.String key,
                                     double value)
        Add or overwrite the given key for the common event properties. Properties will be inherited by children of this transmission target.
        Parameters:
        key - The property key. The key must not be null.
        value - The double value. The value must not be NaN or infinite.
      • setEventProperty

        public void setEventProperty​(java.lang.String key,
                                     long value)
        Add or overwrite the given key for the common event properties. Properties will be inherited by children of this transmission target.
        Parameters:
        key - The property key. The key must not be null.
        value - The long value.
      • setEventProperty

        public void setEventProperty​(java.lang.String key,
                                     java.lang.String value)
        Add or overwrite the given key for the common event properties. Properties will be inherited by children of this transmission target.
        Parameters:
        key - The property key. The key must not be null.
        value - The string value. The value cannot be null.
      • removeEventProperty

        public void removeEventProperty​(java.lang.String key)
        Removes the given key from the common event properties.
        Parameters:
        key - The property key to be removed.
      • collectDeviceId

        public void collectDeviceId()
        Enable collection of the Android device identifier for this target. This does not have any effect on child transmission targets.