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..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 @@ -8,6 +8,10 @@ metaDescription: 'How to configure the New Relic Android agent to report app lau freshnessValidatedDate: 2024-06-11 --- + + New Relic automatically adds the provider to capture app launch times for agent version 7.6.8 and later. + + 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..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 @@ -12,6 +12,10 @@ redirects: freshnessValidatedDate: never --- + + 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. ## 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..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,107 +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. + + 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 + } + ``` -Follow the detailed steps below for your chosen installation method. + 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/). - - -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. + 2. Apply the plugin explicitly to the app-level build file (and any sub-modules intended for instrumentation) using the following syntax: -1. Declare the New Relic plugin to the top-level `build.gradle(.kts)` file using the Gradle Plugin Portal plugin ID: + ```groovy + plugins { + id("com.newrelic.agent.android") + } + ``` -```groovy -plugins { - // for binary Gradle plugins that need to be resolved - id("com.newrelic.agent.android") version "AGENT_VERSION" apply false -} -``` + For detailed information on applying plugins within Gradle, refer to the [Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block). -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/). + -2. Apply the plugin explicitly to the app-level build file (and any sub-modules intended for instrumentation) using the following syntax: + + 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). -```groovy -plugins { - id("com.newrelic.agent.android") -} -``` + To prefer MavenCentral over the Gradle Plugin Portal, you need to make the following changes to Gradle files: -For detailed information on applying plugins within Gradle, refer to the [Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block). + 1. Add this snippet to your top-level build.gradle(.kts) file: - + ```groovy + buildscript { + repositories { + mavenCentral() + } - -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: - -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" + } + } + ``` + + 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 + } + } + ``` -```groovy -buildscript { - repositories { - mavenCentral() - } + 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/). - // not required if plugin classpath in resolutionStrategy{} below - dependencies { - classpath "com.newrelic.agent.android:agent-gradle-plugin:AGENT_VERSION" - } -} -``` + 3. Apply the plugin to the app-level build file, as well as any other sub-module to be instrumented: -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}") + ```groovy + plugins { + id("newrelic") } - } - } - 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/). + + 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. + -3. Apply the plugin to the app-level build file, as well as any other sub-module to be instrumented: - -```groovy -plugins { - id("newrelic") -} -``` - - - - + In your `AndroidManifest.xml` file, add the following permissions: @@ -191,6 +197,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. + 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/). 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 - - - ```