Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ metaDescription: 'How to configure the New Relic Android agent to report app lau
freshnessValidatedDate: 2024-06-11
---

<Callout variant="important">
NewRelic automatically adds the following provider to capture App launch timings for agent versions 7.6.8 and higher.
</Callout>

<Callout variant="important">
This feature is available for agent versions 6.9.0 and higher.
</Callout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ redirects:
freshnessValidatedDate: never
---

<Callout variant="important">
NewRelic automatically adds the following proguard rules for agent versions 7.6.8 and higher.
</Callout>

Follow these instructions to support ProGuard or DexGuard with the Android agent. Check [our Android compatibility and requirements](/docs/mobile-monitoring/new-relic-mobile-android/get-started/new-relic-android-compatibility-requirements), and if you have previously installed the Android agent SDK, follow the [steps before upgrading](/docs/mobile-apps/android-1-upgrade) to the latest version with ProGuard or DexGuard.

## Configure ProGuard [#proguard]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ plugins {

</Step>


<Callout variant="important">
NewRelic automatically adds the following permissions so that it can make HTTP requests to deliver captured data for agent versions 7.6.8 and higher.
</Callout>
<Step>
In your `AndroidManifest.xml` file, add the following permissions:

Expand Down Expand Up @@ -191,6 +195,9 @@ If you use ProGuard or Dexguard for code shrinking, follow these steps:
```java
com.newrelic.application_token=GENERATED_TOKEN
```
<Callout variant="important">
NewRelic automatically adds the following proguard rules for agent versions 7.6.8 and higher.
</Callout>
3. Follow the steps decribed on [Configure ProGuard or DexGuard for Android apps](/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps/).
</Step>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,6 @@ If you need to install the agent manually, follow these steps:
apply plugin: "com.android.application"
apply plugin: 'newrelic' // <-- include this
```

2. In your `AndroidManifest.xml` file, add the following permissions:

```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```
</Step>
</Steps>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,7 @@ If you need to install the agent manually, follow these steps:
```


3. In your `AndroidManifest.xml` file, add the following permissions:
```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```

4. To automatically link the package, rebuild your project:
3. To automatically link the package, rebuild your project:
```shell
# Android apps
ionic capacitor run android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,6 @@ If you need to install the agent manually, follow these steps:
* `Previous`: The URI of the previous page. This won't exist if the previous page was null.
</Step>

<Step>
### (Android only) Add permissions [#android-add-permissions]

If you have an Android-native app, you'll need to add `INTERNET` and `ACCESS_NETWORK_STATE` permissions in your `Platforms/Android/AndroidManifest.xml` file:

```xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
```
</Step>
</Steps>

## Customize the agent instrumentation [#mobile-sdk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,6 @@ If you need to install the agent manually, follow these steps:
apply plugin: "com.android.application"
apply plugin: 'newrelic' // <-- add this
```

4. In your `AndroidManifest.xml` file, add the following permissions:

```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```
</Step>

<Step>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ If you need to install the agent manually, follow these steps:
apply plugin: "com.android.application"
apply plugin: 'newrelic' // <-- include this
```

3. Make sure your app requests `INTERNET` and `ACCESS_NETWORK_STATE` permissions by adding these lines to your `AndroidManifest.xml`:
```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```
</Step>

<Step>
Expand Down
Loading