withApplicationBuild

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 Mobile 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.

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.

Example(s)

Set custom build identifier

To set a custom build identifier:

NewRelic.withApplicationBuild('156')

For more help

Recommendations for learning more: