베이스는 탭뷰이고 액티비티 그룹을 이용했습니다.

액티비티 그룹안에 들어있는 액티비티에서 웹뷰를 선언하여 사용하고 있는대요

web = (WebView) findViewById(R.id.myring_webView);
  WebSettings webSetting = web.getSettings();
//  webSetting.setBuiltInZoomControls(true);
//  webSetting.setSupportZoom(true);
  webSetting.setJavaScriptEnabled(true);
//  webSetting.setPluginsEnabled(true);
  web.setWebViewClient(new Webclient(getParent() , web));

웹뷰 셋팅중에 setJavaScriptEnabled(true) 이걸 선언해줬는대도

웹뷰에서 javaScript 가 있는 부분에 실행이 되서 다이얼로그가 떠야 되는데

webView에 setJavaScriptEnabled 가 적용이 안되는것 같습니다.

 

탭뷰와 액티비티그룹을 사용해서 만든 다른 앱에서는 똑같은 웹페이지를 호출해도 잘되는데

여기서는 왜 잘 안될까요?? 이유를 도무지 모르겠습니다. 도와주세요.ㅠㅠ

 

웹뷰 셋팅이 잘못된거 같은데 뭐가 잘못된걸까요??ㅠㅠ

퍼미션

<uses-permission android:name="android.permission.INTERNET" />

 

액티비티 설정

 <activity android:name="MyringActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"></action>
                <category android:name="android.intent.category.DEFAULT"></category>
                <category android:name="android.intent.category.BROWSABLE"></category>
            </intent-filter>
        </activity>

웹뷰 레이아웃

<FrameLayout
        android:id="@+id/frameLayout2"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="9" >

        <WebView
            android:id="@+id/myring_webView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    </FrameLayout>

 

----------------------------------------------------------------------------------------------------------------------------

webSetting 에 ChromeClent 를 추가했습니다.

web.setWebChromeClient(new Chromeclient(web, null));

추가 하고 실행 하니

에러가 나네요 ㅠㅠ

alert이 뜨지 않은 이유가 ChromeClent 를 추가하지 않아서 그런거 같은대

이 에러가 왜 나는지 알려주세요 ㅠㅠ

 

에러 메시지 :

android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.LocalActivityManager$LocalActivityRecord@41f96058 is not valid; is your activity running?

 

alert이 뜨는 Context 가 재대로 설정이 되어 있지 않아서 그런거 같은대요

activityGroup을 사용해서 context를 getParent를 넘겨 주는대 webChromClient로 getParent context를 보내려면 어떻게 해야 되나요??ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ