Search in sources :

Example 1 with WiGLERegistrationInterface

use of net.wigle.wigleandroid.background.WiGLERegistrationInterface in project wigle-wifi-wardriving by wiglenet.

the class RegistrationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_registration);
    WebView regWebView = (WebView) findViewById(R.id.wigle_registration_container);
    WebSettings webSettings = regWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    regWebView.clearCache(true);
    clearCookies(MainActivity.getMainActivity().getApplicationContext());
    regWebView.setWebChromeClient(new WebChromeClient());
    regWebView.getSettings().setUserAgentString(AGENT);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        WebView.setWebContentsDebuggingEnabled(true);
    }
    regWebView.addJavascriptInterface(new WiGLERegistrationInterface(this), "WiGLEWiFi");
    regWebView.loadUrl(MainActivity.REG_URL);
}
Also used : WebSettings(android.webkit.WebSettings) WebChromeClient(android.webkit.WebChromeClient) WiGLERegistrationInterface(net.wigle.wigleandroid.background.WiGLERegistrationInterface) WebView(android.webkit.WebView)

Aggregations

WebChromeClient (android.webkit.WebChromeClient)1 WebSettings (android.webkit.WebSettings)1 WebView (android.webkit.WebView)1 WiGLERegistrationInterface (net.wigle.wigleandroid.background.WiGLERegistrationInterface)1