Package 

Object DefaultViewIdentifierResolver

  • All Implemented Interfaces:
    com.datadog.android.sessionreplay.utils.ViewIdentifierResolver

    
    public class DefaultViewIdentifierResolver
     implements ViewIdentifierResolver
                        

    Unique Identifier Generator. This class is meant for internal usage so please use it with careful as it might change in time.

    • Method Summary

      Modifier and Type Method Description
      Long resolveViewId(View view) Resolves a persistent, unique id for the given view.
      Long resolveChildUniqueIdentifier(View parent, String childName) Generates a persistent unique identifier for a virtual child view based on its unique name and its physical parent.
      • Methods inherited from class java.lang.Object

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

      • resolveViewId

         Long resolveViewId(View view)

        Resolves a persistent, unique id for the given view.

        Parameters:
        view - the view
      • resolveChildUniqueIdentifier

         Long resolveChildUniqueIdentifier(View parent, String childName)

        Generates a persistent unique identifier for a virtual child view based on its unique name and its physical parent. The identifier will only be created once and persisted in the parent View tag to provide consistency. In case there was already a value with the same key in the tags and this was used by a different party we will try to use this value as identifier if it's a Long, in other case we will return null. This last scenario is highly unlikely but we are doing this in order to safely treat possible collisions with client tags.

        Parameters:
        parent - the parent View of the virtual child
        childName - the unique name of the virtual child