From 4bd1ef2b4479a7308f4bbe88735f94d01a90372d Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Thu, 5 Jun 2025 16:49:20 -0500 Subject: [PATCH 1/9] chore: update docs for aar --- .../monitor-your-flutter-application.mdx | 7 ------- .../introduction-new-relic-ionic-capacitor.mdx | 8 +------- .../monitor-your-net-maui-application.mdx | 10 ---------- .../monitor-your-unity-application.mdx | 7 ------- .../monitor-your-react-native-application.mdx | 6 ------ 5 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-flutter/monitor-your-flutter-application.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-flutter/monitor-your-flutter-application.mdx index 7f85030983d..55626a9c637 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-flutter/monitor-your-flutter-application.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-flutter/monitor-your-flutter-application.mdx @@ -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 - - - ``` diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-ionic-capacitor/get-started/introduction-new-relic-ionic-capacitor.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-ionic-capacitor/get-started/introduction-new-relic-ionic-capacitor.mdx index 1b6d90532e0..db66597a17e 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-ionic-capacitor/get-started/introduction-new-relic-ionic-capacitor.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-ionic-capacitor/get-started/introduction-new-relic-ionic-capacitor.mdx @@ -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 - - - ``` - - 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 diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-maui-dotnet/monitor-your-net-maui-application.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-maui-dotnet/monitor-your-net-maui-application.mdx index dc8a0c8e009..ca4ef8872d6 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-maui-dotnet/monitor-your-net-maui-application.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-maui-dotnet/monitor-your-net-maui-application.mdx @@ -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. - - ### (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 - - - ``` - ## Customize the agent instrumentation [#mobile-sdk] diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-unity/monitor-your-unity-application.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-unity/monitor-your-unity-application.mdx index cfb824354ca..ccd7a4fb486 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-unity/monitor-your-unity-application.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-unity/monitor-your-unity-application.mdx @@ -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 - - - ``` diff --git a/src/content/docs/mobile-monitoring/new-relic-monitoring-react-native/monitor-your-react-native-application.mdx b/src/content/docs/mobile-monitoring/new-relic-monitoring-react-native/monitor-your-react-native-application.mdx index 61ca6544049..32a4f940ecd 100644 --- a/src/content/docs/mobile-monitoring/new-relic-monitoring-react-native/monitor-your-react-native-application.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-monitoring-react-native/monitor-your-react-native-application.mdx @@ -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 - - - ``` From 309aecebfab5c38b8f0659731a8b69b2542e3ea7 Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Fri, 6 Jun 2025 14:38:06 -0500 Subject: [PATCH 2/9] docs: add call out message for aar release --- .../configure-app-launch-time-android-apps.mdx | 4 ++++ .../configure-proguard-or-dexguard-android-apps.mdx | 4 ++++ .../install-configure/install-android-agent-gradle.mdx | 7 +++++++ 3 files changed, 15 insertions(+) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx index 1e0c70c6a25..459daaba7c0 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx @@ -8,6 +8,10 @@ metaDescription: 'How to configure the New Relic Android agent to report app lau freshnessValidatedDate: 2024-06-11 --- + + NewRelic automatically adds the following provider to capture App launch timings for agent versions 8.0.0 and higher. + + This feature is available for agent versions 6.9.0 and higher. diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx index 8e8301aaad0..5f239bf62f1 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx @@ -12,6 +12,10 @@ redirects: freshnessValidatedDate: never --- + + NewRelic automatically adds the following proguard rules for agent versions 8.0.0 and higher. + + 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] diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx index 6c5dfc8834f..4a61066d8de 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx @@ -152,6 +152,10 @@ plugins { + + + NewRelic automatically adds the following permissions so that it can make HTTP requests to deliver captured data for agent versions 8.0.0 and higher. + In your `AndroidManifest.xml` file, add the following permissions: @@ -191,6 +195,9 @@ If you use ProGuard or Dexguard for code shrinking, follow these steps: ```java com.newrelic.application_token=GENERATED_TOKEN ``` + + NewRelic automatically adds the following proguard rules for agent versions 8.0.0 and higher. + 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/). From 0b6456f028ed32a2d901ed92dab363d3bb0e1353 Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Tue, 29 Jul 2025 09:33:30 -0500 Subject: [PATCH 3/9] docs: update aar changes --- .../configure-app-launch-time-android-apps.mdx | 2 +- .../configure-proguard-or-dexguard-android-apps.mdx | 2 +- .../install-configure/install-android-agent-gradle.mdx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx index 459daaba7c0..e7c9b9bb56d 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx @@ -9,7 +9,7 @@ freshnessValidatedDate: 2024-06-11 --- - NewRelic automatically adds the following provider to capture App launch timings for agent versions 8.0.0 and higher. + NewRelic automatically adds the following provider to capture App launch timings for agent versions 7.6.8 and higher. diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx index 5f239bf62f1..362835a9b65 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx @@ -13,7 +13,7 @@ freshnessValidatedDate: never --- - NewRelic automatically adds the following proguard rules for agent versions 8.0.0 and higher. + NewRelic automatically adds the following proguard rules for agent versions 7.6.8 and higher. 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. diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx index 4a61066d8de..ec701f4b133 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx @@ -154,7 +154,7 @@ plugins { - NewRelic automatically adds the following permissions so that it can make HTTP requests to deliver captured data for agent versions 8.0.0 and higher. + 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. In your `AndroidManifest.xml` file, add the following permissions: @@ -196,7 +196,7 @@ If you use ProGuard or Dexguard for code shrinking, follow these steps: com.newrelic.application_token=GENERATED_TOKEN ``` - NewRelic automatically adds the following proguard rules for agent versions 8.0.0 and higher. + NewRelic automatically adds the following proguard rules for agent versions 7.6.8 and higher. 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/). From 7865bf58d4f88d1c54055962f495120cdfaaf2a4 Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Wed, 30 Jul 2025 09:27:47 -0500 Subject: [PATCH 4/9] Update src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx Co-authored-by: WriteMayur --- .../install-configure/install-android-agent-gradle.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx index ec701f4b133..1ae175dcc11 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx @@ -154,7 +154,7 @@ plugins { - 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. + New Relic automatically adds the following permissions to allow the agent to make HTTP requests to deliver captured data for agent versions 7.6.8 and higher. In your `AndroidManifest.xml` file, add the following permissions: From 624d234397f6cd3bec7e2acfb5ac7359386c458f Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Wed, 30 Jul 2025 09:27:55 -0500 Subject: [PATCH 5/9] Update src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx Co-authored-by: WriteMayur --- .../install-configure/install-android-agent-gradle.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx index 1ae175dcc11..0ad924778e4 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx @@ -196,7 +196,7 @@ If you use ProGuard or Dexguard for code shrinking, follow these steps: com.newrelic.application_token=GENERATED_TOKEN ``` - NewRelic automatically adds the following proguard rules for agent versions 7.6.8 and higher. + New Relic automatically adds the proguard rules for agent version 7.6.8 and later. 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/). From ad34e2a9bff9224a11bcbd20d765a8ec2ecd9ce8 Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Wed, 30 Jul 2025 09:28:01 -0500 Subject: [PATCH 6/9] Update src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx Co-authored-by: WriteMayur --- .../configure-proguard-or-dexguard-android-apps.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx index 362835a9b65..fc70a38e3ac 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps.mdx @@ -13,7 +13,7 @@ freshnessValidatedDate: never --- - NewRelic automatically adds the following proguard rules for agent versions 7.6.8 and higher. + New Relic automatically adds the proguard rules for agent version 7.6.8 and later. 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. From b104919c27db0eef8ef1504ba95ea2383a4831d5 Mon Sep 17 00:00:00 2001 From: ndesai-newrelic <89222514+ndesai-newrelic@users.noreply.github.com> Date: Wed, 30 Jul 2025 09:28:10 -0500 Subject: [PATCH 7/9] Update src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx Co-authored-by: WriteMayur --- .../configure-app-launch-time-android-apps.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx index e7c9b9bb56d..3e0b76fd29f 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-app-launch-time-android-apps.mdx @@ -9,7 +9,7 @@ freshnessValidatedDate: 2024-06-11 --- - NewRelic automatically adds the following provider to capture App launch timings for agent versions 7.6.8 and higher. + New Relic automatically adds the provider to capture app launch times for agent version 7.6.8 and later. From cdcae1eb05b62c81e58153e6b58cfacd6a76beef Mon Sep 17 00:00:00 2001 From: Aashirwad Jain Date: Thu, 31 Jul 2025 14:32:37 +0530 Subject: [PATCH 8/9] fix(mdx-issue): resolve verify mdx --- .../install-android-agent-gradle.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx index 0ad924778e4..31f71fa13ee 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx @@ -152,10 +152,10 @@ plugins { + + New Relic automatically adds the following permissions to allow the agent to make HTTP requests to deliver captured data for agent versions 7.6.8 and higher. + - - New Relic automatically adds the following permissions to allow the agent to make HTTP requests to deliver captured data for agent versions 7.6.8 and higher. - In your `AndroidManifest.xml` file, add the following permissions: @@ -195,9 +195,9 @@ If you use ProGuard or Dexguard for code shrinking, follow these steps: ```java com.newrelic.application_token=GENERATED_TOKEN ``` - - New Relic automatically adds the proguard rules for agent version 7.6.8 and later. - + + New Relic automatically adds the proguard rules for agent version 7.6.8 and later. + 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/). From 561d98e497418e03c29e365075bb611885eb50cd Mon Sep 17 00:00:00 2001 From: WriteMayur Date: Thu, 31 Jul 2025 14:55:11 +0530 Subject: [PATCH 9/9] fix(mdx-issue): resolve mdx issues --- .../install-android-agent-gradle.mdx | 180 +++++++++--------- 1 file changed, 91 insertions(+), 89 deletions(-) diff --git a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx index 31f71fa13ee..17b4c83b774 100644 --- a/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx +++ b/src/content/docs/mobile-monitoring/new-relic-mobile-android/install-configure/install-android-agent-gradle.mdx @@ -50,111 +50,113 @@ To install the Android agent, we recommend you follow our guided install: The steps below are outlined in our guided install. Note that even if you manually install the agent, you'll still need to create a New Relic app and obtain the generated application token. This token is essential for the agent to send data to New Relic. - -Add the Android agent plugin to your project. - -Regarding the location of the plugin, you have two options: - -* Recommended: Using the Gradle plugin DSL - * Starting with agent version 7.6.0, the Android agent plugin is available on the [Gradle Plugin Portal](https://plugins.gradle.org/) as a community plugin. The Gradle plugin DSL simpifies adding plugin dependencies to apps. - * This method involves adding the agent plugin dependency to your project's plugins DSL block. -* Legacy Plugin ID (`newrelic`) - * For older projects or specific use cases, you can use the legacy plugin ID. - * This method involves adding the agent as a dependency to your project's build script, specifying the MavenCentral repository. - -Follow the detailed steps below for your chosen installation method. - - - -The recommended approach for managing plugin dependencies in Gradle utilizes the plugins DSL block. This section details applying the fully qualified form of the plugin ID (`com.newrelic.agent.android`) within this structure. - -1. Declare the New Relic plugin to the top-level `build.gradle(.kts)` file using the Gradle Plugin Portal plugin ID: - -```groovy -plugins { - // for binary Gradle plugins that need to be resolved - id("com.newrelic.agent.android") version "AGENT_VERSION" apply false -} -``` - -Make sure to replace `AGENT_VERSION` with your agent version number. We strongly recommend you use the [latest version](/docs/release-notes/mobile-release-notes/android-release-notes/). + + Add the Android agent plugin to your project. + + Regarding the location of the plugin, you have two options: + + * Recommended: Using the Gradle plugin DSL + * Starting with agent version 7.6.0, the Android agent plugin is available on the [Gradle Plugin Portal](https://plugins.gradle.org/) as a community plugin. The Gradle plugin DSL simpifies adding plugin dependencies to apps. + * This method involves adding the agent plugin dependency to your project's plugins DSL block. + * Legacy Plugin ID (`newrelic`) + * For older projects or specific use cases, you can use the legacy plugin ID. + * This method involves adding the agent as a dependency to your project's build script, specifying the MavenCentral repository. + + Follow the detailed steps below for your chosen installation method. + + + + + The recommended approach for managing plugin dependencies in Gradle utilizes the plugins DSL block. This section details applying the fully qualified form of the plugin ID (`com.newrelic.agent.android`) within this structure. + + 1. Declare the New Relic plugin to the top-level `build.gradle(.kts)` file using the Gradle Plugin Portal plugin ID: + + ```groovy + plugins { + // for binary Gradle plugins that need to be resolved + id("com.newrelic.agent.android") version "AGENT_VERSION" apply false + } + ``` -2. Apply the plugin explicitly to the app-level build file (and any sub-modules intended for instrumentation) using the following syntax: + Make sure to replace `AGENT_VERSION` with your agent version number. We strongly recommend you use the [latest version](/docs/release-notes/mobile-release-notes/android-release-notes/). -```groovy -plugins { - id("com.newrelic.agent.android") -} -``` + 2. Apply the plugin explicitly to the app-level build file (and any sub-modules intended for instrumentation) using the following syntax: -For detailed information on applying plugins within Gradle, refer to the [Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block). + ```groovy + plugins { + id("com.newrelic.agent.android") + } + ``` - + For detailed information on applying plugins within Gradle, refer to the [Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block). - -The Android agent plugin is available on MavenCentral and uses the legacy plugin ID `newrelic` for compatibility with older projects. If you choose to leverage this legacy ID for an existing app, you'll need to explicitly configure the classpath to MavenCentral. This ensures Gradle can locate the plugin during your build process. For further details on various methods for resolving plugins, refer to the [Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#sec:binary_plugin_locations). + -To prefer MavenCentral over the Gradle Plugin Portal, you need to make the following changes to Gradle files: + + The Android agent plugin is available on MavenCentral and uses the legacy plugin ID `newrelic` for compatibility with older projects. If you choose to leverage this legacy ID for an existing app, you'll need to explicitly configure the classpath to MavenCentral. This ensures Gradle can locate the plugin during your build process. For further details on various methods for resolving plugins, refer to the [Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#sec:binary_plugin_locations). -1. Add this snippet to your top-level build.gradle(.kts) file: + To prefer MavenCentral over the Gradle Plugin Portal, you need to make the following changes to Gradle files: -```groovy -buildscript { - repositories { - mavenCentral() - } + 1. Add this snippet to your top-level build.gradle(.kts) file: - // not required if plugin classpath in resolutionStrategy{} below - dependencies { - classpath "com.newrelic.agent.android:agent-gradle-plugin:AGENT_VERSION" - } -} -``` + ```groovy + buildscript { + repositories { + mavenCentral() + } -2. Add this snippet to your `settings.gradle(.kts)` file through the `pluginManagement {}` block: - -```groovy -pluginManagement { - repositories { - mavenCentral() // adds repo for NewRelic artifacts - } - resolutionStrategy { - eachPlugin { - // not required if using `classpath dependency` above - if (requested.id.id.startsWith("newrelic") || requested.id.id.startsWith("com.newrelic.agent.android")) { - useModule("com.newrelic.agent.android:agent-gradle-plugin:${AGENT_VERSION}") + // not required if plugin classpath in resolutionStrategy{} below + dependencies { + classpath "com.newrelic.agent.android:agent-gradle-plugin:AGENT_VERSION" + } } - } - } - plugins { - id("newrelic") apply false - } -} -``` + ``` + + 2. Add this snippet to your `settings.gradle(.kts)` file through the `pluginManagement {}` block: + + ```groovy + pluginManagement { + repositories { + mavenCentral() // adds repo for NewRelic artifacts + } + resolutionStrategy { + eachPlugin { + // not required if using `classpath dependency` above + if (requested.id.id.startsWith("newrelic") || requested.id.id.startsWith("com.newrelic.agent.android")) { + useModule("com.newrelic.agent.android:agent-gradle-plugin:${AGENT_VERSION}") + } + } + } + plugins { + id("newrelic") apply false + } + } + ``` -Make sure to replace `AGENT_VERSION` with your agent version number. We strongly recommend you use the [latest version](/docs/release-notes/mobile-release-notes/android-release-notes/). + Make sure to replace `AGENT_VERSION` with your agent version number. We strongly recommend you use the [latest version](/docs/release-notes/mobile-release-notes/android-release-notes/). -3. Apply the plugin to the app-level build file, as well as any other sub-module to be instrumented: + 3. Apply the plugin to the app-level build file, as well as any other sub-module to be instrumented: -```groovy -plugins { - id("newrelic") -} -``` - - + ```groovy + plugins { + id("newrelic") + } + ``` + + + - + + New Relic automatically adds the following permissions to allow the agent to make HTTP requests to deliver captured data for agent versions 7.6.8 and higher. + - - New Relic automatically adds the following permissions to allow the agent to make HTTP requests to deliver captured data for agent versions 7.6.8 and higher. - + In your `AndroidManifest.xml` file, add the following permissions: