Example usage for android.webkit WebView findAddress

List of usage examples for android.webkit WebView findAddress

Introduction

In this page you can find the example usage for android.webkit WebView findAddress.

Prototype

@Nullable
@Deprecated
public static String findAddress(String addr) 

Source Link

Document

Gets the first substring consisting of the address of a physical location.

Usage

From source file:android.webkit.cts.WebViewTest.java

@UiThreadTest
public void testFindAddress() {
    if (!NullWebViewUtils.isWebViewAvailable()) {
        return;//from   ww w. j ava 2  s.c o  m
    }

    /*
     * Info about USPS
     * http://en.wikipedia.org/wiki/Postal_address#United_States
     * http://www.usps.com/
     */
    // full address
    assertEquals("455 LARKSPUR DRIVE CALIFORNIA SPRINGS CALIFORNIA 92826",
            WebView.findAddress("455 LARKSPUR DRIVE CALIFORNIA SPRINGS CALIFORNIA 92826"));
    // not an address
    assertNull(WebView.findAddress("This is not an address: no town, no state, no zip."));
}