public class DataCollectorManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DataCollectorManager.Gender |
static class |
DataCollectorManager.MetricType |
static class |
DataCollectorManager.ValueType |
Modifier and Type | Field and Description |
---|---|
static long |
BACKGROUND_DELAY |
Modifier and Type | Method and Description |
---|---|
void |
addProductToCart(PurchaseProduct product,
DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform
when the user add product to cart.
|
void |
contentView(String nameOfView,
DataCollectorManager.MetricType type)
This function sends a name of current content view the user visualized.
|
static DataCollectorManager |
getInstance(Context ctx) |
void |
loginFacebook(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user login in facebook.
|
void |
loginGeneric(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user login in the app.
|
void |
loginGoogle(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user login in Google.
|
void |
loginTwitter(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user login in Twitter.
|
void |
logoutFacebook(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user logout in facebook.
|
void |
logoutGeneric(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user logout in the app.
|
void |
logoutGoogle(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user logout in Google.
|
void |
logoutTwitter(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user logout in Twitter.
|
void |
purchaseProduct(Products products,
DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform
when the user purchase any product.
|
void |
registerGeneric(DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform when the user create an account in this app.
|
void |
removeProductFromCart(PurchaseProduct product,
DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform
when the user remove product from cart.
|
void |
sendGeolocation(DataCollectorManager.MetricType type)
This function sends user's geolocation to PUSHTech platform.
|
void |
sendGeolocation(Location location,
DataCollectorManager.MetricType type)
This function sends custom geolocation to PUSHTech platform.
|
void |
setBirthdate(Date date,
DataCollectorManager.MetricType type)
This function sends user's birthdate to PUSHTech platform.
|
void |
setCity(String city,
DataCollectorManager.MetricType type)
This function sends user's city to PUSHTech platform.
|
void |
setCountry(Country country,
DataCollectorManager.MetricType type)
This function sends user's country to PUSHTech platform.
|
void |
setCustomEvent(DataCollectorManager.MetricType metricType,
String type,
String eventType,
String value,
DataCollectorManager.ValueType valueType)
This function sends custom metric to PUSHTech platform.
|
void |
setEmail(String email,
DataCollectorManager.MetricType type)
This function sends user's email to PUSHTech platform.
|
void |
setFacebookID(String id,
DataCollectorManager.MetricType type)
This function sends metric user's facebook id to PUSHTech.
|
void |
setFirstName(String firstName,
DataCollectorManager.MetricType type)
This function sends user's name to PUSHTech platform.
|
void |
setGender(DataCollectorManager.Gender gender,
DataCollectorManager.MetricType type)
This function sends user's gender to PUSHTech platform.
|
void |
setGoogleID(String id,
DataCollectorManager.MetricType type)
This function sends metric user's Google id to PUSHTech.
|
void |
setLastName(String lastName,
DataCollectorManager.MetricType type)
This function sends user's last name to PUSHTech platform.
|
void |
setNumberFacebookFriends(int num,
DataCollectorManager.MetricType type)
This function sends number of friends in facebook to PUSHTech platform.
|
void |
setNumberOfTwitterFollowers(int num,
DataCollectorManager.MetricType type)
This function sends number of twitter followers to PUSHTech platform.
|
void |
setNumOfProductInCart(int num,
DataCollectorManager.MetricType type)
This function sends number of products in cart to PUSHTech platform
when the user update cart.
|
void |
setOpenPushCampaign(String campaignId,
DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform
when the user open a pushCampaign.
|
void |
setPhoneNumber(Phonenumber.PhoneNumber phoneNumber,
DataCollectorManager.MetricType type)
This function sends user's phoneNumber to PUSHTech platform.
|
void |
setReceivedPushCampaign(String campaignId,
DataCollectorManager.MetricType type)
This function sends metric to PUSHTech platform
when the user received a pushCampaign.
|
void |
setTwitterID(String id,
DataCollectorManager.MetricType type)
This function sends metric user's Twitter id to PUSHTech.
|
void |
setUserId(String id,
DataCollectorManager.MetricType type)
This function sends metric user's id to PUSHTech.
|
public static final long BACKGROUND_DELAY
public static DataCollectorManager getInstance(Context ctx)
public void setBirthdate(Date date, DataCollectorManager.MetricType type)
date
- user's birthdate.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void sendGeolocation(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void sendGeolocation(Location location, DataCollectorManager.MetricType type)
location
- The location that send.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setCountry(Country country, DataCollectorManager.MetricType type)
country
- user's country.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setCity(String city, DataCollectorManager.MetricType type)
city
- user's city.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setFirstName(String firstName, DataCollectorManager.MetricType type)
firstName
- user's name.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setLastName(String lastName, DataCollectorManager.MetricType type)
lastName
- user's lastName.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setGender(DataCollectorManager.Gender gender, DataCollectorManager.MetricType type)
gender
- user's gender.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setEmail(String email, DataCollectorManager.MetricType type)
email
- user's email.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setPhoneNumber(Phonenumber.PhoneNumber phoneNumber, DataCollectorManager.MetricType type)
phoneNumber
- user's phone number.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void loginGeneric(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void logoutGeneric(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void registerGeneric(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setUserId(String id, DataCollectorManager.MetricType type)
id
- The unique id to identify this users in your app.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void loginFacebook(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void logoutFacebook(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setFacebookID(String id, DataCollectorManager.MetricType type)
id
- User's facebook id.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void loginTwitter(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void logoutTwitter(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setTwitterID(String id, DataCollectorManager.MetricType type)
id
- User's Twitter id.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void loginGoogle(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void logoutGoogle(DataCollectorManager.MetricType type)
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setGoogleID(String id, DataCollectorManager.MetricType type)
id
- User's Google id.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setNumberFacebookFriends(int num, DataCollectorManager.MetricType type)
num
- The number of facebook friends.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setNumberOfTwitterFollowers(int num, DataCollectorManager.MetricType type)
num
- The number of followers.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void contentView(String nameOfView, DataCollectorManager.MetricType type)
nameOfView
- The name of content view.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void purchaseProduct(Products products, DataCollectorManager.MetricType type)
products
- A list of productstype
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void addProductToCart(PurchaseProduct product, DataCollectorManager.MetricType type)
product
- product that add to carttype
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setNumOfProductInCart(int num, DataCollectorManager.MetricType type)
num
- Num of products in cart.type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void removeProductFromCart(PurchaseProduct product, DataCollectorManager.MetricType type)
product
- product that remove from carttype
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setReceivedPushCampaign(String campaignId, DataCollectorManager.MetricType type)
campaignId
- the id of campaign extract in BackendDelivery
or CampaignDelivery
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setOpenPushCampaign(String campaignId, DataCollectorManager.MetricType type)
campaignId
- the id of campaign extract in BackendDelivery
or CampaignDelivery
type
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.public void setCustomEvent(DataCollectorManager.MetricType metricType, String type, String eventType, String value, DataCollectorManager.ValueType valueType)
type
- a custom type.eventType
- a custom subtype.value
- a custom value.metricType
- If the type is FIX only send this metric when changed it,else type is VOLATAILE send everytime.