Class MyTrackerParams
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfacePossible values of the user's gender. -
Method Summary
Modifier and TypeMethodDescriptionintgetAge()Return age of the current user.getCustomParam(String key) Return custom param previously set withsetCustomParam(String, String)or null.Return identifier of the current user.String[]Return identifiers of the current user.getEmail()Return email of the current user.String[]Return emails of the current user.intReturn gender of the current user.getIcqId()Return ICQ id of the current user.String[]Return ICQ ids of the current user.getLang()Return current language.Return MRGS application id.Return current MRGS device id.Return MRGS id of the current user.getOkId()Return OK id of the current user.String[]getOkIds()Return OK ids of the current user.getPhone()Return phone of the current user.String[]Return phone numbers of the current user.Return VK connect id of the current user.String[]Return VK connect ids of the current user.getVkId()Return VK id of the current user.String[]getVkIds()Return VK ids of the current user.setAge(int age) Set age for the current user.setCustomParam(String key, String value) Set custom param for sending data.Set identifier of the current user.setCustomUserIds(String[] ids) Set identifiers of the current user.Set email of the current user.Set emails of the current user.setGender(int gender) Set gender for the current user.Set ICQ id of the current user.Set ICQ ids of the current user.Set current language.setMrgsAppId(String appId) Set MRGS application id.Set MRGS device id.setMrgsUserId(String userId) Set MRGS id for the current user.Set OK id of the current user.Set OK ids of the current user.Set phone of the current user.Set phones of the current user.setVkConnectId(String id) Set VK connect id of the current user.setVkConnectIds(String[] ids) Set VK connect ids of the current user.Set VK id of the current user.Set VK ids of the current user.
-
Method Details
-
getAge
public int getAge()Return age of the current user.- Returns:
- The user's age.
-
setAge
Set age for the current user.- Parameters:
age- User's age.- Returns:
- The current instance of
MyTrackerParams.
-
getGender
public int getGender()Return gender of the current user. Possible values are defined inMyTrackerParams.Gender- Returns:
- The user's gender.
Value is
MyTrackerParams.Gender.UNKNOWN,MyTrackerParams.Gender.MALE,MyTrackerParams.Gender.FEMALE, orMyTrackerParams.Gender.UNSPECIFIED
-
setGender
Set gender for the current user.- Parameters:
gender- User's gender value that defined inMyTrackerParams.Gender. Value isMyTrackerParams.Gender.UNKNOWN,MyTrackerParams.Gender.MALE,MyTrackerParams.Gender.FEMALE, orMyTrackerParams.Gender.UNSPECIFIED- Returns:
- The current instance of
MyTrackerParams.
-
getLang
Return current language. The value can differ from the current language of the system.- Returns:
- Current language.
-
setLang
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
Return MRGS application id.- Returns:
- MRGS application id.
-
setMrgsAppId
Set MRGS application id.- Parameters:
appId- MRGS application id.- Returns:
- The current instance of
MyTrackerParams.
-
getMrgsId
Return current MRGS device id.- Returns:
- MRGS device id.
-
setMrgsId
Set MRGS device id.- Parameters:
mrgsId- MRGS device id.- Returns:
- The current instance of
MyTrackerParams.
-
getMrgsUserId
Return MRGS id of the current user.- Returns:
- The current user's MRGS id.
-
setMrgsUserId
Set MRGS id for the current user.- Parameters:
userId- User's MRGS id.- Returns:
- The current instance of
MyTrackerParams.
-
getCustomUserId
Return identifier of the current user. IfsetCustomUserIds(String[])was called, then the first array item will be returned.- Returns:
- first user's id or
null.
-
setCustomUserId
Set identifier of the current user. This method overrides the value ofsetCustomUserIds(String[]).If custom user ids are changed, then myTracker will send all saved events to the server (with previous custom ids).
- Parameters:
id- user's identifier ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getCustomUserIds
Return identifiers of the current user. IfsetCustomUserId(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setCustomUserId(String)orsetCustomUserIds(String[])to change custom user identifiers.- Returns:
- user's identifiers or
null.
-
setCustomUserIds
Set identifiers of the current user. This method overrides the value ofsetCustomUserId(String).If custom user ids are changed, then myTracker will send all saved events to the server (with previous custom ids).
- Parameters:
ids- user's identifiers ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
getEmail
Return email of the current user. IfsetEmails(String[])was called, then the first email will be returned.- Returns:
- first user's email or
null.
-
setEmail
Set email of the current user. This method overrides the value ofsetEmails(String[]).- Parameters:
email- user's email ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getEmails
Return emails of the current user. IfsetEmail(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setEmail(String)orsetEmails(String[])to change user emails.- Returns:
- user's emails or
null.
-
setEmails
Set emails of the current user. This method overrides the value ifsetEmail(String).- Parameters:
emails- user's emails ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
getIcqId
Return ICQ id of the current user. IfsetIcqIds(String[])was called, then the first id will be returned.- Returns:
- first user's ICQ id or
null.
-
setIcqId
Set ICQ id of the current user. This method overrides the value ofsetIcqIds(String[]).- Parameters:
id- user's ICQ id ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getIcqIds
Return ICQ ids of the current user. IfsetIcqId(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setIcqId(String)orsetIcqIds(String[])to change user ICQ ids.- Returns:
- user's ICQ ids or
null.
-
setIcqIds
Set ICQ ids of the current user. This method overrides the value ifsetIcqId(String).- Parameters:
ids- user's ICQ ids ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
getOkId
Return OK id of the current user. IfsetOkIds(String[])was called, then the first id will be returned.- Returns:
- first user's OK id or
null.
-
setOkId
Set OK id of the current user. This method overrides the value ofsetOkIds(String[]).- Parameters:
id- user's OK id ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getOkIds
Return OK ids of the current user. IfsetOkId(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setOkId(String)orsetOkIds(String[])to change user OK ids.- Returns:
- user's OK ids or
null.
-
setOkIds
Set OK ids of the current user. This method overrides the value ifsetOkId(String)(String)}.- Parameters:
ids- user's OK ids ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
getVkId
Return VK id of the current user. IfsetVkIds(String[])was called, then the first id will be returned.- Returns:
- first user's VK id or
null.
-
setVkId
Set VK id of the current user. This method overrides the value ofsetVkIds(String[]).- Parameters:
id- user's VK id ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getVkIds
Return VK ids of the current user. IfsetVkId(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setVkId(String)orsetVkIds(String[])to change user VK ids.- Returns:
- user's VK ids or
null.
-
setVkIds
Set VK ids of the current user. This method overrides the value ifsetVkId(String)(String)}.- Parameters:
ids- user's VK ids ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
getPhone
Return phone of the current user. IfsetPhones(String[])was called, then the first phone will be returned.- Returns:
- first user's phone number or
null.
-
setPhone
Set phone of the current user. This method overrides the value ofsetPhones(String[]).- Parameters:
phone- user's phone number ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getPhones
Return phone numbers of the current user. IfsetPhone(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setPhone(String)orsetPhones(String[])to change user phone numbers.- Returns:
- user's phone numbers or
null.
-
setPhones
Set phones of the current user. This method overrides the value ifsetPhone(String)(String)}.- Parameters:
phones- user's phone numbers ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
getVkConnectId
Return VK connect id of the current user. IfsetVkConnectIds(String[])was called, then the first id will be returned.- Returns:
- first user's VK connect id or
null.
-
setVkConnectId
Set VK connect id of the current user. This method overrides the value * ofsetVkIds(String[]).- Parameters:
id- user's VK connect id ornull.- Returns:
- The current instance of
MyTrackerParams.
-
getVkConnectIds
Return VK connect ids of the current user. IfsetVkConnectId(String)was called, then single item array will be returned.Don't change this array - it contains independent copy of data. Use
setVkConnectId(String)orsetVkConnectIds(String[])to change user VK connect ids.- Returns:
- user's VK connect ids or
null.
-
setVkConnectIds
Set VK connect ids of the current user. This method overrides the value ifsetVkConnectId(String)(String)} (String)}.- Parameters:
ids- user VK connect ids ornull. Zero-length array is replaced withnull.- Returns:
- The current instance of
MyTrackerParams.
-
setCustomParam
Set custom param for sending data.Use
nullvalue to remove specified param.- Parameters:
key- param key(case insensitive)value- param value ornull
-
getCustomParam
Return custom param previously set withsetCustomParam(String, String)or null.- Parameters:
key- param key (case insensitive)- Returns:
- param value or
null
-