---
title: Name activity for app launch time
source: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/name-android-activity
---

## Syntax [#syntax]

### Java [#java]

```java
NewRelic.withApplicationToken(apptoken).withLaunchActivityName().start(this.getApplication());
```

### Kotlin [#kotlin]

```kotlin
NewRelic.withLaunchActivityName(className: String?)
```

Set the target activity name for app launch time to calculate the cold time and hot time.

## Description [#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 [#parameters]

| Parameter       | Type   | Description                                                                              |
| --------------- | ------ | ---------------------------------------------------------------------------------------- |
| `$activityName` | String | Required. String indicating the target activity name to calculate cold time and hot time |

## Examples [#examples]

### Set activity name

Here's an example of setting the activity name:

### Java [#java]

```java
NewRelic.withLaunchActivityName($activityName)
```

### Kotlin [#kotlin]

```kotlin
NewRelic.withApplicationToken("apptoken").withLaunchActivityName($activityName).start(applicationContext)
```
