Package com.my.tracker
Class MyTrackerParams
- java.lang.Object
-
- com.my.tracker.MyTrackerParams
-
public final class MyTrackerParams extends java.lang.ObjectClass for specifying additional tracking parameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMyTrackerParams.GenderPossible values of the user's gender.
-
Constructor Summary
Constructors Constructor Description MyTrackerParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAge()Return age of the current user.java.lang.StringgetCustomParam(java.lang.String key)Return custom param previously set withsetCustomParam(String, String)or null.java.lang.StringgetCustomUserId()Return identifier of the current user.java.lang.String[]getCustomUserIds()Return identifiers of the current user.java.lang.StringgetEmail()Return email of the current user.java.lang.String[]getEmails()Return emails of the current user.intgetGender()Return gender of the current user.java.lang.StringgetIcqId()Return icq id of the current user.java.lang.String[]getIcqIds()Return icq ids of the current user.java.lang.StringgetLang()Return current language.java.lang.StringgetMrgsAppId()Return MRGS application id.java.lang.StringgetMrgsId()Return current MRGS device id.java.lang.StringgetMrgsUserId()Return MRGS id of the current user.java.lang.StringgetOkId()Return ok id of the current user.java.lang.String[]getOkIds()Return ok ids of the current user.java.lang.StringgetPhone()Return phone of the current user.java.lang.String[]getPhones()Return phones of the current user.java.lang.StringgetVkConnectId()Return vk connect id of the current user.java.lang.String[]getVkConnectIds()Return vk connect ids of the current user.java.lang.StringgetVkId()Return vk id of the current user.java.lang.String[]getVkIds()Return vk ids of the current user.voidputDataToBuilder(ProtoBuilder builder)MyTrackerParamssetAge(int age)Set age for the current user.MyTrackerParamssetCustomParam(java.lang.String key, java.lang.String value)Set custom param for sending data.MyTrackerParamssetCustomUserId(java.lang.String id)Set identifier of the current user.MyTrackerParamssetCustomUserIds(java.lang.String[] ids)Set identifiers of the current user.MyTrackerParamssetEmail(java.lang.String email)Set email of the current user.MyTrackerParamssetEmails(java.lang.String[] emails)Set emails of the current user.MyTrackerParamssetGender(int gender)Set gender for the current user.MyTrackerParamssetIcqId(java.lang.String id)Set icq id of the current user.MyTrackerParamssetIcqIds(java.lang.String[] ids)Set icq ids of the current user.MyTrackerParamssetLang(java.lang.String lang)Set current language.MyTrackerParamssetMrgsAppId(java.lang.String appId)Set MRGS application id.MyTrackerParamssetMrgsId(java.lang.String mrgsId)Set MRGS device id.MyTrackerParamssetMrgsUserId(java.lang.String userId)Set MRGS id for the current user.MyTrackerParamssetOkId(java.lang.String id)Set ok id of the current user.MyTrackerParamssetOkIds(java.lang.String[] ids)Set ok ids of the current user.MyTrackerParamssetPhone(java.lang.String phone)Set phone of the current user.MyTrackerParamssetPhones(java.lang.String[] phones)Set phones of the current user.MyTrackerParamssetVkConnectId(java.lang.String id)Set vk connect id of the current user.MyTrackerParamssetVkConnectIds(java.lang.String[] ids)Set vk connect ids of the current user.MyTrackerParamssetVkId(java.lang.String id)Set vk id of the current user.MyTrackerParamssetVkIds(java.lang.String[] ids)Set vk ids of the current user.
-
-
-
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 inMyTrackerParams.Gender- Returns:
- The user's gender.
-
setGender
@AnyThread @NonNull public MyTrackerParams setGender(int gender)
Set gender for the current user.- Parameters:
gender- User's gender value that defined inMyTrackerParams.Gender.- Returns:
- The current instance of
MyTrackerParams.
-
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. IfsetCustomUserIds(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 ofsetCustomUserIds(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. IfsetCustomUserId(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 ofsetCustomUserId(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. IfsetEmails(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 ofsetEmails(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. IfsetEmail(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 ifsetEmail(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. IfsetIcqIds(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 ofsetIcqIds(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. IfsetIcqId(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 ifsetIcqId(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. IfsetOkIds(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 ofsetOkIds(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. IfsetOkId(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 ifsetOkId(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. IfsetVkIds(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 ofsetVkIds(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. IfsetVkId(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 ifsetVkId(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. IfsetPhones(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 ofsetPhones(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. IfsetPhone(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 ifsetPhone(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. IfsetVkConnectIds(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 * ofsetVkIds(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 ifsetVkConnectId(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. IfsetVkConnectId(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 withsetCustomParam(String, String)or null.- Parameters:
key- param key(case insensitive)- Returns:
- param value
-
putDataToBuilder
public void putDataToBuilder(@NonNull ProtoBuilder builder)
-
-