---
title: Shut down the agent
source: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/shut-down-agent
---

## Android

### Syntax [#syntax]

#### Java [#java]

```java
NewRelic.shutdown()
```

#### Kotlin [#kotlin]

```kotlin
NewRelic.shutdown()
```

### Description [#description]

This API provides the ability to shut down the agent within the current application lifecycle during runtime. Once the agent has shut down, it cannot be restarted within the current application lifecycle.

### Example [#example]

#### Java [#java]

```java
NewRelic.shutdown()
```

#### Kotlin [#kotlin]

```kotlin
NewRelic.shutdown()
```

## iOS

### Syntax [#syntax]

#### Objective-c [#objc]

```objectivec
+ (void) shutdown();
```

#### Swift [#swift]

```swift
NewRelic.shutdown() -> Void
```

### Description [#description]

This API provides the ability to shut down the agent within the current application lifecycle during runtime. Once the agent has shut down, it cannot be restarted within the current application lifecycle.

### Examples [#examples]

#### Objective-C [#obj-c]

```objectivec
[NewRelic shutdown];
```

#### Swift [#swift]

```swift
NewRelic.shutdown()
```

## Capacitor

### Syntax [#syntax]

```typescript
shutdown(options?: {} | undefined) => void
```

### Description [#description]

Shut down the agent within the current application lifecycle during runtime.

### Example [#example]

```typescript
NewRelicCapacitorPlugin.shutdown();
```

## Cordova

### Syntax [#syntax]

```typescript
shutdown() : void;
```

### Description [#description]

Shut down the agent within the current application lifecycle during runtime.

### Example [#example]

```js
NewRelic.shutdown();
```

## .NET MAUI

### Syntax [#syntax]

```csharp
Shutdown() : void
```

### Description [#description]

Shut down the agent within the current application lifecycle during runtime.

### Example [#example]

```csharp
CrossNewRelic.Current.Shutdown());
```

## React Native

### Syntax [#syntax]

```js
shutdown() : void;
```

### Description [#description]

Shut down the agent within the current application lifecycle during runtime.

### Example [#example]

```js
NewRelic.shutdown();
```

## Unreal Engine

### Syntax [#syntax]

```cpp
shutdown(): void;
```

### Description [#description]

Shut down the agent within the current application lifecycle during runtime.

### Example [#example]

```cpp
UNewRelicBPLibrary::shutdown();;
```
