- Fix: fix ANR issue caused by MediaDRM api
- New: deprecate jcenter and bintray
- New: fix get unique id NPE
- New: Add referrer property when tracking Deep Link Opened
- New: Make new lifecycle methods opt-out
- New: Kotlin Demo App
- New: Custom apiHost for Segment.IO and support multi-regional Segment
- Fix: Add NonNull annotations to params for analytics constructor
- Fix: Retry hasPermission in case of failure due to package manager being inactive
- Fix: Marshal NaN and other special numbers to 0.0 and not produce malformed JSON
- New: Remove the ability to natively report attribution information via Segment integrations
- New: Edge Function Support
- New: Add a Webhook Integration for viewing payloads
- New: Enable faster project settings refresh when debugging enabled
- Fix: Generate timestamps at call site rather than asynchronously
- Fix: Fix: Proguard/R8 configuration for createValueMap
- Fix: handle RuntimeException when calling
getActivityInfo
- New: Experimental Nanosecond timestamps
- Fix: Use AndroidX lifecycle functions for App Fore/Backgrounded
- Fix: Fix alias not overridden by cached value
- Fix: Catch null intent data
- New: Add type to device context
- Fix: Prevent Global Context modification for one-time op
- New: Add support for Destination Middleware
- New: Add DefaultProjectSettings in Analytics.Builder
- Fix: Test coverage fix after previous merge to master
- New: Update project to AndroidX
- Fix: Set build property to String
- Promoting 4.5.x to stable release. This includes all changes since 4.3.1.
- Fix: Check integration settings for null
- New: Make crypto abstract methods public
- Fix: Preserve BUILD and VERSION keys on reset() calls
- Fix: Resolves ArrayIndexOutOfBoundsException crash (#586)
- Fix: Updated documentation on deep copy and threading
- Fix: Double check that input stream is closed
- New: Track "Deep Link Opened" on activity creation
- New: Add Application Open and Application Backgrounded Events
- Fix: Send application build number as a string to match our documentation and other libraries. If you were relying on this field being a number, you may need to update reports that rely on the now deprecated behaviour. You can also override this behaviour and keep the deprecated behaviour by supplying the
build
field manually.
PackageManager packageManager = context.getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(context.getPackageName(), 0);
Map<String, Object> app = new LinkedHashMap<>();
// Put the build as an integer instead of string.
app.put("build", packageInfo.versionCode);
// Put other application context fields that the library collects. Not shown in this example, but you should filter out any null fields.
app.put("name", packageInfo.applicationInfo.loadLabel(packageManager));
app.put("version", packageInfo.versionName);
app.put("namespace", packageInfo.packageName);
analytics.getAnalyticsContext().put("app", app);
- New: Add
Options#putContext
method. This allows you to send context fields for a single event. This can also override default context fields for a single event.
analytics.track("My Event", properties, new Options().putContext("custom_context_field", true));
-
New: Send a custom user agent on HTTP requests originating the library. The new user-agent will be formatted as
analytics-android/{version}
. -
Fix: Retry network requests when server responds with a HTTP 429 response code.
-
Fix: Update maximum message limit to be 32kb to match our API limits.
-
Fix: Fix race condition that could cause events to pick up user IDs after the event was originally recorded.
- Fix: Rename
Properties#putSubtotal
helper toProperties#subtotal
. - New: Send disabled events to Segment's API so that it can be surfaced in the debugger. These events will not be sent to any destination.
- New: Add support for schema defaults.
- Fix: Show better errors for unexpected 3xx response codes.
- Promoting RC to stable release. This includes all the improvements from 4.3.0-RC1 and 4.3.0-RC2.
- New: Look up Advertising ID for Amazon Fire devices.
- Fix: Attribution tracking using mobile service should be false by default.
- New: Add Middlewares.
- Fix: Unregister Application lifecycle callbacks on shutdown.
- Fix: Record
ms
precision in timestamps. - Fix: Support serialization of Primitive arrays.
- Fix: Update Cartographer. This fixes an issue where sending custom values sent as arrays would not be serialized correctly.
- Fix: Make DateFormat access thread safe. This fixes an issue where generated timestamps could be sometimes be malformed and not conform to the ISO 8601 standard.
- Fix: Using
Properties#putProducts
was stored as an array instead of a list, and not serialized correctly. This caused it to be usable by Segment and server side integrations. If you're stuck on a previous version for some reason, you can manually store it as a list:
List<Product> products = new ArrayList<>();
products.add(new Product("foo", "bar", 10));
// add other products to this list.
Properties properties = new Properties();
properties.put("products", products);
- Fix: Version 4.2.2 introduced a change where a default application wide cache was being installed for HTTPURLConnection requests. If you were not using an HTTP cache already or relying on this behaviour, this may have resulted in unintended caching behaviour for your application. This fix returns to the behaviour before 4.2.2, where this library does not install a cache. You may continue to choose to install an application level cache for HTTPURLConnection if you wish.
- [Improvement]: Update CDN hostname from
cdn.segment.com
tocdn-settings.segment.com
. This endpoint has been added to improve performance for mobile clients.
- Fix: Rely on HTTP cache for caching settings responses. This fixes a regression introduced in version 4.1.4, where cached settings responses were not being used, and would always be fetched from the network.
- Fix: Use Application Opened instead of Application Started.
- Improvement: Update Google Play Services for Android wear module.
- Improvement: Reduce synthetic accessor methods.
- Fix: Handle
null
values in maps. - New: Add the ability for the SDK to natively report attribution information via Segment integrations enabled for your project, without needing to bundle their SDKs. Attribution information is sent as a track call as documented in the mobile lifecycle spec.
Analytics analytics = new Analytics.Builder(context, writeKey)
.trackAttributionInformation()
.build();
- Improvement: Add more logging when collecting advertising ID.
- Improvement: Add more protection against growing disk queue to over 2GB.
- New: Add opt out method in the library. This will stop sending any events to all integrations for the device.
analytics.optOut(true);
- Fix: Use Application Opened instead of Application Started.
- Improvement: gzip HTTP request body.
- Fix: Guard against possible ArrayIndexOutOfBoundsException.
- Fix: Early Return when queue error occurs
- Fix: Don't block user thread while waiting for advertising ID
- Fix: Add Memory Fallback and be lenient about Queue Errors.
- Fix: Wait for advertising ID to be ready before enqueuing events.
- New: Instrument automatic screen tracking. Enable this during initialization.
Analytics analytics = new Analytics.Builder(context, writeKey)
.recordScreenViews()
.build();
- Fix: Handling how advertising information is collected. Previously, if
isLimitAdTracking
was true, the library would incorrectly record it asadTrackingEnabled: true
, when it should have beenadTrackingEnabled: false
. A server side fix has been deployed to automatically correct this. However, we still recommend customers update to the latest version.
- New: Instrument automatic application lifecycle event tracking. Enable this during initialization.
Analytics analytics = new Analytics.Builder(context, writeKey)
.trackApplicationLifecycleEvents()
.build();
- Fix: Dump raw QueueFile data to track #321.
- Fix: Fix for possible race condition when mutating integration options on multiple threads.
- Fix: Another update to
Options
handling, so that it can not override the tracking plan if an event is disabled.
- Fix: Handle possible NPE introduced in 4.0.6.
- Fix: Update
Options
handling so that it overrides the tracking plan.
- Fix: Correctly disable events from being sent server side for bundled integrations.
- New: Improve logging information for QueueFile.
- Fix: Collect advertising ID based on whether the
AdvertisingIdClient
is available rather thanGoogleAnalytics
.
- Fix: Actually fix NPE when device is offline duNring initialization.
- Fix: NPE when device is offline during initialization.
- Deprecates
analytics-core
artifact. This is now renamed into theanalytics
artifact. - Bundling integrations is now more explicit. It takes 2 steps:
Add the integration dependencies.
compile('com.segment.analytics.android.integrations:google-analytics:1.0.0') {
transitive = true
}
compile('io.branch.segment.analytics.android.integrations:library:1.0.0-RELEASE') {
transitive = true
}
...
Register them in your builder when you initialize the SDK.
Analytics analytics = new Analytics.Builder(context, writeKey)
.use(GoogleAnalyticsIntegration.FACTORY)
.use(BranchIntegration.FACTORY)
...
.build();
-
Updating Amplitude SDK to 2.2.0
-
New Logging API for integrations
- Integrations will log the exact method call made by them, which makes it easier to see exactly how a Segment call is translated for the end tool. Currently only done for a few tools (Mixpanel, Google Analytics, Flurry, Localytics), but will be added for more tools.
- LogLevel.BASIC is now deprecated. Use LogLevel.DEBUG instead.
- Logging behaviour with regards to bundled integrations has changed. See the JavaDocs for more details.
-
Update MoEngage SDK to 5.3.10
-
Fix bug with MoEngage integration when trying to track events outside of an activity.
- Update Tapstream
- Attribute that events are made from the Segment SDK to Kahuna.
- Update Mixpanel SDK to 4.6.4
- Update Amplitude SDK to 2.1.0
- Send transaction data correctly to Google Analytics
- Update Play Services dependencies to 8.1.0
- Update Support Library dependency to 23.0.1
- updating Amplitude SDK to v2.0.4
- update localytics version to 3.4.2
- Updating MoEngage SDK version
- Handle case when context.device is null
- Use US ISO 8601 timestamps
- Add 'collectDeviceId' Builder option. AnonymousId is used in place of device identifiers if enabled.
- UXCam lib updated to v2.0.6
- Add aliases for revenue keys
- Send revenue to AppsFlyer if one is set
- Improve GA integration, most notably - add support for custom dimensions and metrics
- Fix toString implementation
- Fix: Edge case when using
Options.setIntegration(name, true)
for a bundled integration would cause events to be sent twice, once server side and once client side. - Enhancement: Fail early if multiple conflicting Analytics instances are created. Two analytics instances will conflict if they have the same tag (which is automatically generated from the write key if it is not explicilty provided).
- Enhancement: Update Amplitude SDK to 2.0.2
- Enhancement: Update Kahuna SDK to 2.0.3
- Enhancement: Update MoEngage SDK to 5.2.21
- Enhancement: Fail early if messages are enqueued after shutting down an Analytics instance.
- Fix: Race where activitiy lifecycle events would be delivered before initialization is complete.
- Fix: Properly handle
null
inJSONObject
. - Enhancement: Dump more output to address issues #263, #321, #309.
- Feature: Add MoEngage integration
- Feature: Add Apptimize Root integration
- Enhancement: Track LTV with Localytics
- Fix: Localytics ready callback
- Enhancement: Add API to presize Properties and Traits
- Enhancement: Update Amplitude SDK
- Enhancement: Update Apptimize SDK
- Enhancement: Update Bugsnag SDK
- Enhancement: Update Crittercism SDK
- Enhancement: Update Flurry SDK
- Enhancement: Update Google Analytics SDK
- Enhancement: Update Leanplum SDK
- Enhancement: Update Quantcast SDK
- Enhancement: Update Tapstream SDK
- Enhancement: Update Localytics SDK and integration with support for custom dimensions.
- Fix: Track increment events for Mixpanel
- Enhancement: Improved flushing behaviour. If you were manually setting a
flushQueueSize
, make sure it is under 250. - Enhancement: Update Leanplum SDK
- Feature: Updated Kahuna Integration with E-Commerce Spec
- Enhancement: Update Apptimize SDK
- Enhancement: Update Amplitude SDK
- Enhancement: Print full error messages for 400 Responses
- Fix: NPE in Google Analytics Integration
- Feature: Add reset method
- Feature: Add Apptimize Integration
- Feature: Add APIs to send custom options to integrations
- Feature: Add ability to set a custom connection factory (Beta)
- Fix: Attach JAR for core artifact
- Enhancement: Update Crittercism Integration
- Enhancement: Update Amplitude Integration
- Fix: Send Kahuna quantity and revenue for track calls
- Fix: Guard against negative file length in QueueFile. This is a potential fix for #172
- Enhancement: Log when an event is created
- Enhancement: Log when no integrations are enabled
- Enhancement: Update Kahuna integration
- Enhancement: Update payload limits
- Enhancement: Fix some context fields
- Fix: AAR packaging for error 'module depends on libraries but is not a library itself'
- Fix: Potential NPE for disabled integrations
- Fix: Correctly forward
createdAt
to Mixpanel - Fix: Callback for Quantcast integration
- Fix: Update Taplytics dependency
- Enhancement: Collect context data as per our spec
- Enhancement: Update Flurry dependency
- Enhancement: Support
increment
events for Mixpanel
- Feature: Add support for Tracking Plan
- Feature: Add API's to pass in executors for network calls
- Feature: New type safe integration callback API
- Feature: Add API's to control logging behaviour for bundled integrations
- Enhancement: Remove integration adapters from
analytics-core
module - Enhancement: Update Leanplum dependency
- Enhancement: Update Mixpanel dependency
- Fix: Correctly convert special traits for Mixpanel
- Fix: Alias method implementation and docs