The Acoustic Analytics Developer Hub

Welcome to the Acoustic Analytics developer hub. You'll find comprehensive guides and documentation to help you start working with Acoustic Analytics as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Accessing native Android methods with JavaScript through Tealeaf customized WebView

Skill Level: Any


When you create hybrid applications, you can access native Android methods with JavaScript using the customized WebView.


Before you begin, you must:

  • Install and implement the most recent Acoustic Experience Analytics (Tealeaf)Android SDK.
  • Include the most recent UI Capture j2 JavaScript source file.


1. Add WebView to your application.

Specify a length, height, weight, and ID that suits your application:

 android:layout_weight="1" />

2. In your activity, locate the WebView and load your HTML file:

public class MainActivity extends ActionBarActivity {
 private UICWebView mUICWebView;
 private String logicalPageName = "BridgeAppActivity";
 protected void onCreate(Bundle savedInstanceState) {
 // Initialize tealeaf with a reference to application
 Tealeaf tealeaf = new Tealeaf(this.getApplication());
 // Load HTML file from local resource in the UICWebview
 mUICWebView = (UICWebView) findViewById(;
 // Modify the Url for your hybrid app 
 WebSettings webSettings = mUICWebView.getSettings();

3. Copy the application's files

Copy the application's HTML and JavaScript files to the /assets/www folder in your Android project.

Updated a day ago

Accessing native Android methods with JavaScript through Tealeaf customized WebView

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.