• Log inStart now

withApplicationBuild (Android SDK API)

Syntax

NewRelic.withApplicationBuild(string $buildId)

Set a custom build identifier string that is associated with an interaction.

Requirements

Agent version 5.1.0 or higher.

Description

This call allows you to set a custom build identifier string that appears next to the application version in the Crash report page. Instead of using the versionCode string defined in AndroidManifest.xml, call the withApplicationBuild() method and pass along the custom build ID as a string.

Important

Deprecated: As of version 5.3.0 of the New Relic Android agent, withApplicationBuild() has replaced NewRelic.withBuildIdentifier().

For general info on using this API, see the Android SDK API usage guide.

Parameters

Parameter

Description

$buildId

string

Required. String indicating build ID.

Examples

Set custom build identifier

To set a custom build identifier:

NewRelic.withApplicationBuild('156')
Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.