Package com.batch.android
Class Batch.Profile
java.lang.Object
com.batch.android.Batch.Profile
- Enclosing class:
- Batch
Batch Profile module
-
Method Summary
Modifier and TypeMethodDescriptionstatic BatchProfileAttributeEditor
editor()
Get a profile attribute editor.static void
Identify the user's installation with an omnichannel profile.static void
trackEvent
(String event) Track an event.static void
trackEvent
(String event, BatchEventAttributes attributes) Track an event.static void
trackLocation
(Location location) Track a location update.
-
Method Details
-
identify
Identify the user's installation with an omnichannel profile.- Parameters:
identifier
- the custom user identifier or null to erase
-
editor
Get a profile attribute editor.Batch must be started to save it. Note that you should chain calls to the returned editor. If you call this method again, you will get another editor that's not aware of changes made elsewhere that have not been saved.
- Returns:
- A BatchProfileAttributeEditor instance.
-
trackEvent
Track an event. You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.- Parameters:
event
- The event name.
-
trackEvent
Track an event. You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.- Parameters:
event
- The event name.attributes
- The event attributes. Can be null.
-
trackLocation
Track a location update. You can call this method from any thread. Batch must be started at some point, or location updates won't be sent to the server.
The location object usually comes from the location system service, or the Fused Location API, but can also manually create it.
If you manually create it, please make sure to fill the accuracy and date if you have that data: both of these values are used to improve the targeting.- Parameters:
location
- The location. Can't be null.
-