New Relic Mobile's Android agent provides configuration settings to change the default behavior of the agent. For an explanation of Mobile custom data types, see Add custom data to New Relic Mobile.
All settings, including the call to invoke the agent, are called in the
onCreate method of the
MainActivity class. To change settings, call the setting in one of two ways (if the setting supports it):
Change the setting on its own line for each specific condition:
NewRelic.disableFeature(FeatureFlag.DefaultInteractions); NewRelic.enableFeature(FeatureFlag.CrashReporting); NewRelic.withApplicationToken(<NEW_RELIC_TOKEN>).start(this.getApplication());
Change the setting as part of the agent start call using the
NewRelic.withApplicationToken(<NEW_RELIC_TOKEN>) .withDefaultInteractions(false) .withCrashReportingEnabled(true) .start(this.getApplication());
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.