2.40.2 (2024-06-12)
2.40.1 (2024-04-17)
2.40.0 (2024-04-17)
2.39.9 (2024-02-27)
2.39.8 (2023-07-21)
2.39.7 (2023-07-07)
2.39.6 (2023-07-06)
2.39.5 (2023-06-13)
2.39.4 (2023-06-01)
2.39.3 (2023-04-29)
- filter null value in identify user properties (#356) (779b6b3)
- update identify interceptor to identify only (#357) (afd3251)
Please check the releases page for up to date changes.
- Add
setMinTimeBetweenSessionsMillis
in plugin for Unity Plugin to use.
- Add
setOffline
in plugin for Unity Plugin to use.
- Introducing useDynamicConfig flag!! Turning this flag on will find the best server url automatically based on users' geo location.
- Note 1. If you have your own proxy server and use setServerUrl API, please leave this OFF.
- Note 2. If you have users in China Mainland, we suggest you turn this on.
- Note 3. By default, this feature is OFF. So you need to explicitly set it to ON to use it.
- Added setServerUrl to
AmplitudePlugin
to enable it for Unity SDK too. - Fix an issue during location fetching.
- Fix the incorrect behavior of
disableLocationListening
. If you want to disable location listening over LocationManager. Please call called before initialization.
- Remove ComodoRSA certificate for SSL pinning.
- Add 3 APIs to
AmplitudePlugin
(uploadEvents
,useAdvertisingIdForDeviceId
,setDeviceId
)
- Remove the declaration of location related permissions in manifest file.
- Added APIs to
AmplitudeClient
to let users set library name and version. This should be only used when you develop your own library which wraps Amplitude Android SDK.
- Now you can set auth token! Use
AmplitudeClient#setBearerToken(String token)
please!
- Fix the issue that
version
property shows old version.
- Now you can enable or disable COPPA (Children's Online Privacy Protection Act) restrictions on ADID, city, IP address and location tracking.
AmplitudeClient#enableCoppaControl()
andAmplitudeClient#disableCoppaControl()
- Catch exceptions when fetching most recent location.
- Handle SQLite database crashes caused by fetching events that exceed 2MB (max size of cursor window).
- Make
startNewSessionIfNeeded
a public method. Only call this if you know what you are doing. This may trigger a new session to start.
- Store deviceId in SharedPreferences as backup in case SQLite database fails or becomes corrupted.
- Add ability to set a custom server URL for uploading events using
setServerUrl
.
- Update SDK to better handle when the SQLite database file gets corrupted between interactions.
- Add optional diagnostic logging that tracks exceptions thrown in the SDK and sends to Amplitude.
- Add ability to set group properties via a new
groupIdentify
method that takes in anIdentify
object as well as a group type and group name.
- Update SDK to better handle SQLite Exceptions.
- Add
TrackingOptions
interface to customize the automatic tracking of user properties in the SDK (such as language, ip_address, platform, etc). See Help Center Documentation for instructions on setting up this configuration.
- Use randomly generated device id if user has limitAdTracking enabled.
- Updating to OkHttp 3.10.0
- Lowering event upload max batch size from 100 to 50. This should help to avoid out of memory issues on Android devices with low memory.
- Added a
setUserId
method with optional boolean argumentstartNewSession
, which whentrue
starts a new session after changing the userId.
- Add ability to specify a custom
platform
value during initialization as an input argument. If the value isnull
or an empty string thenplatform
will default toAndroid
.
- Expose a public
getUserPropertiesOperations
method on theIdentify
class. - Handle exceptions when the LocationManager is not available for fetching location.
- Updating to latest version of OkHttp3 (3.9.0)
- Switch to an internal implementation of
isEmptyString
instead of Android TextUtils.
- Add support for logging events to multiple Amplitude apps. See our Help Center Documentation for details.
- Handle exceptions when fetching device carrier information. Thanks to @fkam-tt for the pull request.
- Copy userProperties on main thread in
setUserProperties
to prevent ConcurrentModificationExceptions. - Migrating setup instructions and SDK documentation in the README file to Zendesk articles.
- Handle exceptions when reading from database. Only affects certain Fairphone and LG devices.
- Handle exceptions when building request to upload event data. Only affects certain Lenovo devices.
- Fix crash when pulling null unsent event strings during upload.
- Fix bug where unserializable events were being saved to unsent events table.
- Added more logging around JSON serialization errors when logging events.
- Fix bug where
regenerateDeviceId
was not being run on background thread. DeviceInfo.generateUUID() should be a static method.
- Add helper method to regenerate a new random deviceId. This can be used in conjunction with
setUserId(null)
to anonymize a user after they log out. Note this is not recommended unless you know what you are doing. See Readme for more information.
- Allow
logEvent
with a custom timestamp (milliseconds since epoch). See documentation for more details.
- Add ability to log identify events outOfSession, this is useful for updating user properties without triggering session-handling logic. See Readme for more information.
- Catch and handle
CursorWindowAllocationException
thrown when the SDK is querying from the SQLite DB when app memory is low. If the exception is caught duringinitialize
, then it is treated as ifinitialize
was never called. If the exception is caught during the uploading of unsent events, then the upload is deferred to a later time. - Block event property and user property dictionaries that have more than 1000 items. This is to block properties that are set unintentionally (for example in a loop). A single call to
logEvent
should not have more than 1000 event properties. Similarly a single call tosetUserProperties
should not have more than 1000 user properties. - Handle IllegalArgumentException thrown by Android Geocoder for bad lat / lon values.
- Fix bug where
enableLocationListening
anddisableLocationListening
were not being run on background thread. Thanks to @elevenfive for PR. - Update
Revenue
class to expose publicequals
andhashCode
methods.
- Fix bug where
setOptOut
was not being run on background thread. productId
is no longer a required field forRevenue
logged vialogRevenueV2
.- Fix bug where receipt and receiptSignature were being truncated if they were too long (exceeded 1024 characters).
- Add automatic flushing of unsent events on app close/minimize (through the Activity Lifecycle
onPause
callback). This only works if you callAmplitude.getInstance().enableForegroundTracking(getApplication());
, which is recommended in the README by default for Setup. To disable you can callAmplitude.getInstance().setFlushEventsOnClose(false);
- Run the
initialize
logic on the background thread so that the SQLite database operations do not delay the main thread. - Add support for Amazon Advertising ID (use in place of Google Advertising ID on Amazon devices). Thanks to @jcomo for the pull request.
- Add documentation for SDK functions. You can take a look here. A link has also been added to the Readme.
- Fix bug where fetching the user's location on select devices throws a SecurityException, causing a crash.
- RevenueProperties is a confusing name and should actually be eventProperties. Deprecating Revenue.setRevenueProperties and replacing it with Revenue.setEventProperties, and clarified in Readme.
- Add support setting groups for users and events. See Readme for more information.
- Add helper method
getSessionId
to expose the current sessionId value. - Add
logRevenueV2
and newRevenue
class to support logging revenue events with properties, revenue type, and verified. See Readme for more info. - Fix crash when trying to enableForegroundTracking with the PinnedAmplitudeClient. AmplitudeClient methods should be using
this
instead of staticinstance
variable.
- Update to OKHttp v3.0.1.
- Add support for prepend user property operation.
- Fix bug where merging events for upload causes array index out of bounds exception.
- Migrate shared preferences (userId and event meta data) to Sqlite db to support apps with multiple processes.
- Fix bug where updateServer sets the wrong batchLimit when limit is false.
- Add ability to clear all user properties.
- Check that SDK is initialized when user calls enableForegroundTracking, identify, setUserProperties.
- Add support for append user property operation.
- Log if Google Play Services is enabled for the application.
- Removed all references to Apache HTTPClient to support Android M.
- Handle exceptions when fetching last known location from LocationManager.
- Add ability to set custom deviceId.
- Handle exception when cloning JSON object.
- Maintain only one instance of OKHttpClient.
- Add AmplitudeLog helper class that supports enabling and disabling of logging as well as setting of the log level.
- Fix bug where event and identify queues are not truncated if eventMaxCount is less than eventRemoveBatchSize.
- Add support for user properties operations (set, setOnce, add, unset).
- Fix bug where end session event was not being sent upon app reopen.
- Fix bug where deviceInfo was trying to use Geocoder if none present.
- Fix bug where deviceId was being fetched on main thread.
- Fix Maven jar, fixed build file.
- Catch all exceptions thrown by Android TelephonyManager and NullPointerExceptions thrown by geocoder during country lookup.
- Expose user ID with getUserId.
- Simplified session tracking. No longer need to call startSession and endSession. No longer send start/end session events by default. Added foreground tracking for sessions that uses Android activity lifecycles.
- The minimum supported API level is 9. API level 14 is required for foreground tracking.
- Always track Android advertising ID (ADID) regardless of limit ad tracking enabled.
- Track if limit ad tracking enabled as an API property for each logged event.
- Database upgraded to version 2: added a new store table for key value pairs.
- Device ID is now saved to and reloaded from the SQLite database (instead of SharedPrefs because SharedPrefs currently does not support multiple processes).
- MessageDigest.getInstance(String) is not threadsafe (known Android issue). Replaced with alternate MD5 implementation from http://org.rodage.com/pub/java/security/MD5.java.
- Create a copy of input userProperties JSONObject in setUserProperties to try and prevent ConcurrentModificationException.
- Enable configuration of eventUploadThreshold, eventMaxCount, eventUploadMaxBatchSize, eventUploadPeriodSeconds, minTimeBetweenSessionsMillis, and sessionTimeoutMillis.
- Add offline mode to turn off server uploading for a time.
- Add synchronous logging. Logs events to the DB synchronously to guarantee event persistence.
- Change protection on AmplitudeClient to public.
- Fix double class inclusion in jar distribution
- Fix crash under aggressive proguard optimizations.
- Fix device id being lost occasionally on app update.
- Fix exception when calling logEvent with empty JSONObject.
- Log a DEBUG message on each event.
- Add PinnedAmplitudeClient to support SSL pinning.
- Deprecate static methods on Amplitude. Switch to using Amplitude.getInstance().
- Upgrade HTTP client to okhttp.
- Fix bug when initializing with user id. Api key was not set properly.
- Expose setUserProperties(JSONObject, boolean) as a static
- Handle null edge cases in location request
- Add user opt out support
- Merge user properties in setUserProperties by default
- Refactor Amplitude to be a singleton to support tests
- Add option to disable fine-grained location tracking
- Fix crash: ConcurrentModificationException in HashMap
- Fix crash: CursorWindowAllocationException in SQLite
- Update field names, split platform and os, and send library information
- Don't log end session event if session isn't open
- Fix creating a new session id when the previous session id is invalid or non existant
- Hotfix extra class file in jar.
- Send androidADID with events
- Use Google Play Advertising ID instead of Android ID, if set. Default / fall back on using a random UUID
- Pull country from reverse geocode, then telephony network country, then locale
- Add getDeviceId to unity plugin
- Add additional logRevenue methods for receipt validation
- Make device ID public
- Fix bug where first event was getting skipped from upload
- Catch SQLiteExceptions
- Catch exceptions through by Apache HTTPClient
- Initial packaged release