Package com.batch.android
Class Batch.User
java.lang.Object
com.batch.android.Batch.User
- Enclosing class:
- Batch
Batch User module
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear all tags and attributes set on an installation and their local cache returned by fetchAttributes and fetchTagCollections.static voidfetchAttributes(Context context, BatchAttributesFetchListener listener) Read the saved attributes.static voidfetchTagCollections(Context context, BatchTagCollectionsFetchListener listener) Read the saved tag collections.static StringgetIdentifier(Context context) Read the custom identifier.static StringGet the unique installation ID, generated by Batch.static StringgetLanguage(Context context) Read the language.static StringRead the region.
-
Method Details
-
getInstallationID
Get the unique installation ID, generated by Batch. Batch must be started to read it.- Returns:
- Batch-generated installation ID. Might be null if Batch isn't started.
-
getLanguage
Read the language.- Returns:
- The custom language set with
InstallDataEditor. Returns null by default.
-
getRegion
Read the region.- Returns:
- The custom region set with
InstallDataEditor. Returns null by default.
-
getIdentifier
Read the custom identifier.- Returns:
- The custom identifier set with
InstallDataEditor. Returns null by default.
-
fetchAttributes
Read the saved attributes. Reading is asynchronous so as not to interfere with saving operations.- Parameters:
context- Android's contextlistener- Pass a listener to be notified of the fetch result.
-
fetchTagCollections
Read the saved tag collections. Reading is asynchronous so as not to interfere with saving operations.- Parameters:
context- Android's contextlistener- Pass a listener to be notified of the fetch result.
-
clearInstallationData
public static void clearInstallationData()Clear all tags and attributes set on an installation and their local cache returned by fetchAttributes and fetchTagCollections. This doesn't affect data set on profiles using Batch.Profile.
-