_______ ___ _______ ___ _____ ___ ______ ___

__________ ____ _______ ____________ __ ______ _____________ _____ ____ ____ __________ _ ___ _______________ _____ ___ ______

___ ___ __________ ____ _______ ____________ ___ ______ ___ _____ ___ _______ ___ _____ ____ ___ ______ _____________ _______________ ___ ________

__ __________ ____ _______ ___________ ___ ___ ____ ____ ______ ____ ______ ___ ____________ __ ____ _____

注: ______ ___ __ ___ ________ __ __________ ______ ___ ___ ________

______ _____ _______ __ ___ __ ____ ___________

___ ______ _______ _______ _____________ ________ ______ ___ ________ _ ___ ________ __ _______________ ___ ______ __ ___ ___ ___ ____ ______ _______ __ ______ ____ __ __________ _____________ ___ ___ ______ _______ _____ ___ __________ ______ __ ______________ ___ ______ ___ __________ _______ __ _ _______ ______

_____ _____________ ___ ____________

________ __________ __ ____ ___________

__ __________ ____________ ____ ___ __ _______ ___ ______ __ __ ___ ___ ____ ________ ___________

__ ________ __________ __ ____ ____________ ____ ___ ____________ ____ ___ ____ ___ ______ ___ ______ ___ ______________ ___ ____________ ________ __ __ ___ _________ _________

______
android {
   compileOptions {
      //...
      coreLibraryDesugaringEnabled = true
      sourceCompatibility = JavaVersion.VERSION_1_8 // Java 8 and higher
      targetCompatibility = JavaVersion.VERSION_1_8 // Java 8 and higher
      //...
   }
}

dependencies {
   //...
   coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
   //...
}
______
android {
   compileOptions {
      //...
      coreLibraryDesugaringEnabled true
      sourceCompatibility JavaVersion.VERSION_1_8 // Java 8 and higher
      targetCompatibility JavaVersion.VERSION_1_8 // Java 8 and higher
      //...
   }
}

dependencies {
   //...
   coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
   //...
}

____ ___ ____ ____ _______ __ _________ __________ __ ____ ____________

注: ____ ____ ____ ____ _______ ______ ______ __ _______ _____ ___ _______

_______ ___ _______ _____ __ _ __________

__ ________ ___ ______ ___ ____ _______ ___ _______ ___ _____ __ _ __________ __________ __ ____ _______ ____________

______ _____ _____ __ _______ ___ _______ ___ _____ _____ _____ ________

  1. ____ ____ _____ _______ __ __ ___ ____________ _______ __ ____ ____ ____________ _____

    allprojects {
       repositories {
          google()
       //...
          mavenCentral()
       }
    }
  2. ___ ___ ______ _______ ___ _____ _______ __ _ __________ __ ___ ____________ ____ __ ____ ____________

    ______
    dependencies {
    //...
       // Set the desired version of the RUM agent.
       // See available releases: https://github.com/signalfx/splunk-otel-android/releases
       implementation("com.splunk:splunk-otel-android:+")
       implementation("io.opentelemetry.android:instrumentation:+")
    //...
    }
    ______
    dependencies {
    //...
       // Set the desired version of the RUM agent.
       // See available releases: https://github.com/signalfx/splunk-otel-android/releases
       implementation 'com.splunk:splunk-otel-android:+'
       implementation 'io.opentelemetry.android:instrumentation:+'
    //...
    }
  3. _________ ___ __________ ___ _______ ___ _____ __ _______ _ _____________ ______ __ ___ ______________ ____ __ _______________________

    import com.splunk.rum.SplunkRum
    import com.splunk.rum.StandardAttributes
    import io.opentelemetry.api.common.Attributes
    
    class MyApplication extends Application {
       private final String realm = "<realm>";
       private final String rumAccessToken = "<your_RUM_access_token>";
    
       @Override
       public void onCreate() {
          super.onCreate();
    
          SplunkRum.builder()
                   .setApplicationName("<name_of_app>")
                   .setDeploymentEnvironment("<name_of_env>") // Environment
                   .setRealm(realm)
                   .setRumAccessToken(rumAccessToken)
                   .setGlobalAttributes(
                         Attributes.builder() // Add the application version. Alternatively, you
                            // can pass BuildConfig.VERSION_NAME as the value.
                            .put(StandardAttributes.APP_VERSION, "<version_of_app>")
                            .build()
                   )
                   // Turn off instrumentation of background processes
                   .disableBackgroundTaskReporting(BuildConfig.<id_of_application>)
                   // Activates debug logging if needed
                   //.enableDebug()
                   .build(this);
       }
    }
  4. __________ ____ ____ _______ ___ ________ ___ _________ ________ ___________ _______

    private fun buildOkHttpClient(splunkRum: SplunkRum): Call.Factory {
       return splunkRum.createRumOkHttpCallFactory(OkHttpClient())
    }

    ___ ____ _______________ ________ ___ ____ ____________

    注: ____ ____ __ _______ ___ ______ __ __________ __ ______ ___ __ __ ________ __ _____ ________ _______________________________________ _______ _________ __ _________ __ ____ __ _______ __ _ ______ ________ ___ ________ ____ __ ______ ___ _________ _______________ __ _______ __ _ ___ ___ ___ ______ ________________
  5. _______ ___ _______ __ ___ _______ ____________

  6. ________ ____ ____ ________ __ ____ ____________ _____ ______ __________ ____ ___ ____________ ______ ____ ___ ____ __ _________ __ ___ ___ __________

    注: ___ ___ _____ _______ ___ _______ ___ _____ ___ ____ ___________ __ _______ ___ _________________________ ______ ________ __ ____ _____

___ _ ______ ___________ _____ _______ ____ ___ ___ ______ ___________ __ ______ _

_____ ___ _______ ___ _______ _______

__ ________ ___ _____ ___ _______ ___ _______ ________ ______ _____ ______

  1. _____ ___ __________ __ ____ ________

    git clone https://github.com/signalfx/splunk-otel-android.git
  2. _____ _______ ___ _______ __ ____ _____ _____ ___________

    ./gradlew publishToMavenLocal
  3. ____ ____ __ ___ ____________ __ ___ __________ __ ____ ____________ _____

    allprojects {
       repositories {
          google()
    //...
          mavenLocal()
       }
    }
  4. ___ ___ _______ ______ _____ __ _ __________ __ ___ ____________ _____

    dependencies {
       //...
          implementation ("com.splunk:splunk-otel-android:<version>")
       //...
    }

__________ _______ ________ _____ ___ _______ ___ _____

___ ___ ___ ______ ___ _______________ ___ _______ ___ _______________ ______________ __ _______ ___ ___________________ _______ ____ ________________ __ ___ ___ ____ ________ __ ___ _______

___ _________ _______ _____ ___ __ _________ _______ ___ ____ ______ _______ ____

import android.webkit.WebView
import com.splunk.rum.SplunkRum

//...
/*
Make sure that the WebView instance only loads pages under
your control and instrumented with Splunk Browser RUM. The
integrateWithBrowserRum() method can expose the splunk.rumSessionId
of your user to every site/page loaded in the WebView instance.
*/
override fun onViewCreated(view: View, @Nullable savedInstanceState: Bundle?) {
   super.onViewCreated(view, savedInstanceState)
   binding.webView.setWebViewClient(LocalContentWebViewClient(assetLoader))
   binding.webView.loadUrl("https://subdomain.example.com/instrumented-page.html")
   binding.webView.getSettings().setJavaScriptEnabled(true)
   binding.webView.addJavascriptInterface(WebAppInterface(getContext()), "Android")
   SplunkRum.getInstance().integrateWithBrowserRum(binding.webView)
}

____ ___ ____ ______ ___

______ ___ ____ ______ ______ __ _________ ___ ________ ____ _______ ___ _____ ___ ___ ____ ___ __ ____ ____________ ___ __ ____ ___ _________ ___ ________ ______ ___ __________ ___________

__ ________ ___ ______ _____________ __ _____________ _______ ____ ___ _____________ _______ ___ ______ _____ _____ ____ ___ _______ ____ ________ _____ ___ _______

___ ___ ___________ ________ ___ ___________ ___ _____________ ______ __ __________________________________________ ___ _________________________________________ __ ____ __ ______ ____

______ __________ ______ _______ _________

__ ______ __ ______ __________ __ ____ ______ ____ __ __________ ____________ ___________ ______ ___ ______ ______

___ __ __________

___ ______ _____________ _______________ ___ _______ __ ___________ _________ ___ ___ __________ __ ___ ___________ __ ________ ____ ________ __ _______ __ _____ _____ ___ ___ ____________ __________ __ _______

____ _____