Syntax
Java
NewRelic.withApplicationToken(apptoken).withLaunchActivityName().start(this.getApplication());
Kotlin
NewRelic.withLaunchActivityName(className: String?)
Set the target activity name for app launch time to calculate the cold time and hot time.
Description
By default, the New Relic Android agent calculates the cold time and hot time when the default activity is loaded. This API allows you to customize the target launch activity name when calculating the cold time and hot time.
Parameters
Parameter | Type | Description |
---|---|---|
| String | Required. String indicating the target activity name to calculate cold time and hot time |
Examples
Set activity name
Here's an example of setting the activity name:
Java
NewRelic.withLaunchActivityName($activityName)
Kotlin
NewRelic.withApplicationToken("apptoken").withLaunchActivityName($activityName).start(applicationContext)