Class MyTrackerParams


  • public final class MyTrackerParams
    extends java.lang.Object
    Class for specifying additional tracking parameters
    • Constructor Detail

      • MyTrackerParams

        public MyTrackerParams()
    • Method Detail

      • getAge

        @AnyThread
        public int getAge()
        Return age of the current user.
        Returns:
        The user's age.
      • setAge

        @AnyThread
        @NonNull
        public MyTrackerParams setAge​(int age)
        Set age for the current user.
        Parameters:
        age - User's age.
        Returns:
        The current instance of MyTrackerParams.
      • getGender

        @AnyThread
        public int getGender()
        Return gender of the current user. Possible values are defined in MyTrackerParams.Gender
        Returns:
        The user's gender.
      • getLang

        @AnyThread
        @Nullable
        public java.lang.String getLang()
        Return current language. The value can differ from the current language of the system.
        Returns:
        Current language.
      • setLang

        @AnyThread
        @NonNull
        public MyTrackerParams setLang​(@Nullable
                                       java.lang.String lang)
        Set current language. You could use this method to override the system value of the language.
        Parameters:
        lang - Current language.
        Returns:
        The current instance of MyTrackerParams.
      • getMrgsAppId

        @AnyThread
        @Nullable
        public java.lang.String getMrgsAppId()
        Return MRGS application id.
        Returns:
        MRGS application id.
      • setMrgsAppId

        @AnyThread
        @NonNull
        public MyTrackerParams setMrgsAppId​(@Nullable
                                            java.lang.String appId)
        Set MRGS application id.
        Parameters:
        appId - MRGS application id.
        Returns:
        The current instance of MyTrackerParams.
      • getMrgsId

        @AnyThread
        @Nullable
        public java.lang.String getMrgsId()
        Return current MRGS device id.
        Returns:
        MRGS device id.
      • setMrgsId

        @AnyThread
        @NonNull
        public MyTrackerParams setMrgsId​(@Nullable
                                         java.lang.String mrgsId)
        Set MRGS device id.
        Parameters:
        mrgsId - MRGS device id.
        Returns:
        The current instance of MyTrackerParams.
      • getMrgsUserId

        @AnyThread
        @Nullable
        public java.lang.String getMrgsUserId()
        Return MRGS id of the current user.
        Returns:
        The current user's MRGS id.
      • setMrgsUserId

        @AnyThread
        @NonNull
        public MyTrackerParams setMrgsUserId​(@Nullable
                                             java.lang.String userId)
        Set MRGS id for the current user.
        Parameters:
        userId - User's MRGS id.
        Returns:
        The current instance of MyTrackerParams.
      • getCustomUserId

        @AnyThread
        @Nullable
        public java.lang.String getCustomUserId()
        Return identifier of the current user. If setCustomUserIds(String[]) was called, then the first array item will be returned.
        Returns:
        Current user's id.
      • setCustomUserId

        @AnyThread
        @NonNull
        public MyTrackerParams setCustomUserId​(@Nullable
                                               java.lang.String id)
        Set identifier of the current user. This method overrides the value of setCustomUserIds(String[]).
        Parameters:
        id - User's identifier.
        Returns:
        The current instance of MyTrackerParams.
      • getCustomUserIds

        @AnyThread
        @Nullable
        public java.lang.String[] getCustomUserIds()
        Return identifiers of the current user. If setCustomUserId(String) was called, then single item array will be returned.
        Returns:
        Current user's identifiers.
      • setCustomUserIds

        @AnyThread
        @NonNull
        public MyTrackerParams setCustomUserIds​(@Nullable
                                                java.lang.String[] ids)
        Set identifiers of the current user. This method overrides the value of setCustomUserId(String).
        Parameters:
        ids - User's identifiers.
        Returns:
        The current instance of MyTrackerParams.
      • getEmail

        @AnyThread
        @Nullable
        public java.lang.String getEmail()
        Return email of the current user. If setEmails(String[]) was called, then the first email will be returned.
        Returns:
        The current user's email.
      • setEmail

        @AnyThread
        @NonNull
        public MyTrackerParams setEmail​(@Nullable
                                        java.lang.String email)
        Set email of the current user. This method overrides the value of setEmails(String[]).
        Parameters:
        email - User's email.
        Returns:
        The current instance of MyTrackerParams.
      • getEmails

        @AnyThread
        @Nullable
        public java.lang.String[] getEmails()
        Return emails of the current user. If setEmail(String) was called, then single item array will be returned.
        Returns:
        Current user's emails.
      • setEmails

        @AnyThread
        @NonNull
        public MyTrackerParams setEmails​(@Nullable
                                         java.lang.String[] emails)
        Set emails of the current user. This method overrides the value if setEmail(String).
        Parameters:
        emails - User's emails.
        Returns:
        The current instance of MyTrackerParams.
      • getIcqId

        @AnyThread
        @Nullable
        public java.lang.String getIcqId()
        Return icq id of the current user. If setIcqIds(String[]) was called, then the first id will be returned.
        Returns:
        The current user's icq id.
      • setIcqId

        @AnyThread
        @NonNull
        public MyTrackerParams setIcqId​(@Nullable
                                        java.lang.String id)
        Set icq id of the current user. This method overrides the value of setIcqIds(String[]).
        Parameters:
        id - User's icq id.
        Returns:
        The current instance of MyTrackerParams.
      • getIcqIds

        @AnyThread
        @Nullable
        public java.lang.String[] getIcqIds()
        Return icq ids of the current user. If setIcqId(String) was called, then single item array will be returned.
        Returns:
        Current user's icq ids.
      • setIcqIds

        @AnyThread
        @NonNull
        public MyTrackerParams setIcqIds​(@Nullable
                                         java.lang.String[] ids)
        Set icq ids of the current user. This method overrides the value if setIcqId(String).
        Parameters:
        ids - User's icq ids.
        Returns:
        The current instance of MyTrackerParams.
      • getOkId

        @AnyThread
        @Nullable
        public java.lang.String getOkId()
        Return ok id of the current user. If setOkIds(String[]) was called, then the first id will be returned.
        Returns:
        The current user's ok id.
      • setOkId

        @AnyThread
        @NonNull
        public MyTrackerParams setOkId​(@Nullable
                                       java.lang.String id)
        Set ok id of the current user. This method overrides the value of setOkIds(String[]).
        Parameters:
        id - User's ok id.
        Returns:
        The current instance of MyTrackerParams.
      • getOkIds

        @AnyThread
        @Nullable
        public java.lang.String[] getOkIds()
        Return ok ids of the current user. If setOkId(String) was called, then single item array will be returned.
        Returns:
        Current user's ok ids.
      • setOkIds

        @AnyThread
        @NonNull
        public MyTrackerParams setOkIds​(@Nullable
                                        java.lang.String[] ids)
        Set ok ids of the current user. This method overrides the value if setOkId(String) (String)}.
        Parameters:
        ids - User's ok ids.
        Returns:
        The current instance of MyTrackerParams.
      • getVkId

        @AnyThread
        @Nullable
        public java.lang.String getVkId()
        Return vk id of the current user. If setVkIds(String[]) was called, then the first id will be returned.
        Returns:
        The current user's vk id.
      • setVkId

        @AnyThread
        @NonNull
        public MyTrackerParams setVkId​(@Nullable
                                       java.lang.String id)
        Set vk id of the current user. This method overrides the value of setVkIds(String[]).
        Parameters:
        id - User's vk id.
        Returns:
        The current instance of MyTrackerParams.
      • getVkIds

        @AnyThread
        @Nullable
        public java.lang.String[] getVkIds()
        Return vk ids of the current user. If setVkId(String) was called, then single item array will be returned.
        Returns:
        Current user's vk ids.
      • setVkIds

        @AnyThread
        @NonNull
        public MyTrackerParams setVkIds​(@Nullable
                                        java.lang.String[] ids)
        Set vk ids of the current user. This method overrides the value if setVkId(String) (String)}.
        Parameters:
        ids - User's vk ids.
        Returns:
        The current instance of MyTrackerParams.
      • getPhone

        @AnyThread
        @Nullable
        public java.lang.String getPhone()
        Return phone of the current user. If setPhones(String[]) was called, then the first phone will be returned.
        Returns:
        The current user's phone number.
      • setPhone

        @AnyThread
        @NonNull
        public MyTrackerParams setPhone​(@Nullable
                                        java.lang.String phone)
        Set phone of the current user. This method overrides the value of setPhones(String[]).
        Parameters:
        phone - User's phone number.
        Returns:
        The current instance of MyTrackerParams.
      • getPhones

        @AnyThread
        @Nullable
        public java.lang.String[] getPhones()
        Return phones of the current user. If setPhone(String) was called, then single item array will be returned.
        Returns:
        Current user's phone numbers.
      • setPhones

        @AnyThread
        @NonNull
        public MyTrackerParams setPhones​(@Nullable
                                         java.lang.String[] phones)
        Set phones of the current user. This method overrides the value if setPhone(String) (String)}.
        Parameters:
        phones - User's phone numbers.
        Returns:
        The current instance of MyTrackerParams.
      • getVkConnectId

        @AnyThread
        @Nullable
        public java.lang.String getVkConnectId()
        Return vk connect id of the current user. If setVkConnectIds(String[]) was called, then the first id will be returned.
        Returns:
        The current user's vk connect id.
      • setVkConnectId

        @AnyThread
        @NonNull
        public MyTrackerParams setVkConnectId​(@Nullable
                                              java.lang.String id)
        Set vk connect id of the current user. This method overrides the value * of setVkIds(String[]).
        Parameters:
        id - User's vk connect id.
        Returns:
        The current instance of MyTrackerParams.
      • setVkConnectIds

        @AnyThread
        @NonNull
        public MyTrackerParams setVkConnectIds​(@Nullable
                                               java.lang.String[] ids)
        Set vk connect ids of the current user. This method overrides the value if setVkConnectId(String) (String)} (String)}.
        Parameters:
        ids - User's vk connect ids.
        Returns:
        The current instance of MyTrackerParams.
      • getVkConnectIds

        @AnyThread
        @Nullable
        public java.lang.String[] getVkConnectIds()
        Return vk connect ids of the current user. If setVkConnectId(String) was called, then single item array will be returned.
        Returns:
        Current user's vk connect ids.
      • setCustomParam

        @AnyThread
        @NonNull
        public MyTrackerParams setCustomParam​(@NonNull
                                              java.lang.String key,
                                              @Nullable
                                              java.lang.String value)
        Set custom param for sending data.
        Parameters:
        key - param key(case insensitive)
        value - param value
      • getCustomParam

        @AnyThread
        @Nullable
        public java.lang.String getCustomParam​(@NonNull
                                               java.lang.String key)
        Return custom param previously set with setCustomParam(String, String) or null.
        Parameters:
        key - param key(case insensitive)
        Returns:
        param value
      • putDataToBuilder

        public void putDataToBuilder​(@NonNull
                                     ProtoBuilder builder)