테스트 사이트 - 개발 중인 베타 버전입니다

웹뷰에서 tel: sms: 가 안됩니다 채택완료

위해피 8년 전 조회 5,687

웹뷰에서 tel:  sms: 링크가 적용이 안되요

앱은 초보라 모르겠네요...전문가 분들 조언 부탁드려요

 

</p><pre style='color: rgb(0, 0, 0); font-family: "굴림체"; font-size: 9pt; background-color: rgb(255, 255, 255);'><span style="color: rgb(0, 0, 128); font-weight: bold;">package </span>com.hybrid.sample;

<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.content.Intent;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.net.Uri;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.os.Bundle;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.os.Handler;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.os.Process;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.support.v7.app.AppCompatActivity;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.view.KeyEvent;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.view.View;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.webkit.WebView;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.webkit.WebViewClient;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.widget.Toast;


<span style="color: rgb(0, 0, 128); font-weight: bold;">public class </span>MainActivity <span style="color: rgb(0, 0, 128); font-weight: bold;">extends </span>AppCompatActivity {

    <span style="color: rgb(0, 0, 128); font-weight: bold;">private </span>WebView <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>;
    <span style="color: rgb(0, 0, 128); font-weight: bold;">private </span>String <span style="color: rgb(102, 14, 122); font-weight: bold;">mCurrentUrl</span>;

    <span style="color: rgb(0, 0, 128); font-weight: bold;">private final static </span>String <span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">MAIN_URL </span>= "<span style="color: rgb(0, 128, 0); font-weight: bold;"><a href="<a href="http://sir.kr" target="_blank" rel="noopener noreferrer">http://sir.kr</a>"><a href="http://sir.kr" target="_blank" rel="noopener noreferrer">http://sir.kr</a></a></span>";

    <span style="color: rgb(128, 128, 128); font-style: italic;">// BACK 2번 클릭 시 종료 핸들러. 플래그
</span><span style="color: rgb(128, 128, 128); font-style: italic;">    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">private </span>Handler <span style="color: rgb(102, 14, 122); font-weight: bold;">mHandler </span>= <span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Handler();
    <span style="color: rgb(0, 0, 128); font-weight: bold;">private boolean </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mFlag </span>= <span style="color: rgb(0, 0, 128); font-weight: bold;">false</span>;


    <span style="color: rgb(128, 128, 0);">@Override
</span><span style="color: rgb(128, 128, 0);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">protected void </span>onCreate(Bundle savedInstanceState) {
        <span style="color: rgb(0, 0, 128); font-weight: bold;">super</span>.onCreate(savedInstanceState);
        setContentView(R.layout.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">activity_main</span>);

        <span style="color: rgb(128, 128, 128); font-style: italic;">//스플래시
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span>startActivity(<span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Intent(<span style="color: rgb(0, 0, 128); font-weight: bold;">this</span>, SplashActivity.<span style="color: rgb(0, 0, 128); font-weight: bold;">class</span>));

        <span style="color: rgb(128, 128, 128); font-style: italic;">//웹뷰 설정
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView </span>= (WebView) findViewById(R.id.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">web</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getSettings().setJavaScriptEnabled(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
        <span style="color: rgb(128, 128, 128); font-style: italic;">//mWebView.setInitialScale(100);
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.setLayerType(View.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">LAYER_TYPE_HARDWARE</span>, <span style="color: rgb(0, 0, 128); font-weight: bold;">null</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getSettings().setUseWideViewPort(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getSettings().setLoadWithOverviewMode(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.setWebViewClient(<span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>WebViewClientClass());
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.loadUrl(<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">MAIN_URL</span>);
    }


    <span style="color: rgb(0, 0, 128); font-weight: bold;">private class </span>WebViewClientClass <span style="color: rgb(0, 0, 128); font-weight: bold;">extends </span>WebViewClient {
        <span style="color: rgb(0, 0, 128); font-weight: bold;">public boolean </span>shouldOverrideUrlLoading(WebView view, String overrideUrl) {
            view.loadUrl(overrideUrl);
            <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
        }
    }


    <span style="color: rgb(128, 128, 0);">@Override
</span><span style="color: rgb(128, 128, 0);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">public boolean </span>onKeyDown(<span style="color: rgb(0, 0, 128); font-weight: bold;">int </span>keyCode, KeyEvent event) {

        <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(keyCode == KeyEvent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">KEYCODE_BACK</span>) {

            <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(<span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getOriginalUrl().equalsIgnoreCase(<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">MAIN_URL</span>)) {
                <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(!<span style="color: rgb(102, 14, 122); font-weight: bold;">mFlag</span>) {
                    Toast.<span style="font-style: italic;">makeText</span>(<span style="color: rgb(0, 0, 128); font-weight: bold;">this</span>, <span style="color: rgb(0, 128, 0); font-weight: bold;">"뒤로 버튼을 한번 더 누르시면 종료됩니다."</span>, Toast.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">LENGTH_SHORT</span>).show();    <span style="color: rgb(128, 128, 128); font-style: italic;">// 종료안내 toast 를 출력
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                    </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mFlag </span>= <span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>;
                    <span style="color: rgb(102, 14, 122); font-weight: bold;">mHandler</span>.sendEmptyMessageDelayed(<span style="color: rgb(0, 0, 255);">0</span>, <span style="color: rgb(0, 0, 255);">2000</span>);    <span style="color: rgb(128, 128, 128); font-style: italic;">// 2000ms 만큼 딜레이
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">return false</span>;
                } <span style="color: rgb(0, 0, 128); font-weight: bold;">else </span>{
                    <span style="color: rgb(128, 128, 128); font-style: italic;">// 앱 종료 code
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                    </span>moveTaskToBack(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
                    finish();
                    android.os.Process.<span style="font-style: italic;">killProcess</span>(Process.<span style="font-style: italic;">myPid</span>());
                }
            } <span style="color: rgb(0, 0, 128); font-weight: bold;">else </span>{
                <span style="color: rgb(128, 128, 128); font-style: italic;">// 뒤로 가기 실행
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                </span><span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(<span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.canGoBack()) {
                    <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.goBack();
                    <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
                }
            }
        }
        <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
    }

    <span style="color: rgb(0, 0, 128); font-weight: bold;">public boolean </span>shouldOverrideUrlLoading(WebView view, String url) {
        <span style="color: rgb(0, 0, 128); font-weight: bold;">if</span>( url.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"http:"</span>) || url.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"https:"</span>) ) {
            <span style="color: rgb(0, 0, 128); font-weight: bold;">return false</span>;
        }

        <span style="color: rgb(128, 128, 128); font-style: italic;">// Otherwise allow the OS to handle it
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span><span style="color: rgb(0, 0, 128); font-weight: bold;">else if </span>(url.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"tel:"</span>)) {
            Intent tel = <span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Intent(Intent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">ACTION_DIAL</span>, Uri.<span style="font-style: italic;">parse</span>(url));
            startActivity(tel);
            <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
        }
        <span style="color: rgb(0, 0, 128); font-weight: bold;">else if </span>(url.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"mailto:"</span>)) {
            String body = <span style="color: rgb(0, 128, 0); font-weight: bold;">"Enter your Question, Enquiry or Feedback below:</span><span style="color: rgb(0, 0, 128); font-weight: bold;">\n\n</span><span style="color: rgb(0, 128, 0); font-weight: bold;">"</span>;
            Intent mail = <span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Intent(Intent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">ACTION_SEND</span>);
            mail.setType(<span style="color: rgb(0, 128, 0); font-weight: bold;">"application/octet-stream"</span>);
            mail.putExtra(Intent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">EXTRA_EMAIL</span>, <span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>String[]{<span style="color: rgb(0, 128, 0); font-weight: bold;">"email address"</span>});
            mail.putExtra(Intent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">EXTRA_SUBJECT</span>, <span style="color: rgb(0, 128, 0); font-weight: bold;">"Subject"</span>);
            mail.putExtra(Intent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">EXTRA_TEXT</span>, body);
            startActivity(mail);
            <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
        }
        <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
    }


}
</pre><p>
 

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
포이치
8년 전

  Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(url));  

 

정리해서

 

     if (url.startsWith("tel:") || url.startsWith("sms:") || url.startsWith("smsto:") || url.startsWith("mms:") || url.startsWith("mmsto:"))

       { 

         Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(url)); 

         startActivity(intent); 

         return true;

       }

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

위해피
8년 전
감사합니다.
근데 앱은 초보라 소스를 어떻게 적용해야 될 지 모르겠네요..

소스를 적어주시면 ㄳ하겠습니다..
위해피
8년 전
적용 했습니다. ㄳㄳ

댓글을 작성하려면 로그인이 필요합니다.

예감
8년 전

필요하신 분이 있을 것 같아...소스 올립니다.

 

</p><pre style='color: rgb(0, 0, 0); font-family: "굴림체"; font-size: 9pt; background-color: rgb(255, 255, 255);'><span style="color: rgb(0, 0, 128); font-weight: bold;">package </span>com.hybrid.sample;

<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.content.Intent;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.net.Uri;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.os.Bundle;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.os.Handler;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.os.Process;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.support.v7.app.AppCompatActivity;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.view.KeyEvent;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.view.View;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.webkit.WebView;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.webkit.WebViewClient;
<span style="color: rgb(0, 0, 128); font-weight: bold;">import </span>android.widget.Toast;


<span style="color: rgb(0, 0, 128); font-weight: bold;">public class </span>MainActivity <span style="color: rgb(0, 0, 128); font-weight: bold;">extends </span>AppCompatActivity {

    <span style="color: rgb(0, 0, 128); font-weight: bold;">private </span>WebView <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>;
    <span style="color: rgb(0, 0, 128); font-weight: bold;">private </span>String <span style="color: rgb(102, 14, 122); font-weight: bold;">mCurrentUrl</span>;

    <span style="color: rgb(0, 0, 128); font-weight: bold;">private final static </span>String <span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">MAIN_URL </span>= <span style="color: rgb(0, 128, 0); font-weight: bold;">"<a href="http://food.wehappy.net/" target="_blank" rel="noopener noreferrer">http://food.wehappy.net/</a>"</span>;

    <span style="color: rgb(128, 128, 128); font-style: italic;">// BACK 2번 클릭 시 종료 핸들러. 플래그
</span><span style="color: rgb(128, 128, 128); font-style: italic;">    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">private </span>Handler <span style="color: rgb(102, 14, 122); font-weight: bold;">mHandler </span>= <span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Handler();
    <span style="color: rgb(0, 0, 128); font-weight: bold;">private boolean </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mFlag </span>= <span style="color: rgb(0, 0, 128); font-weight: bold;">false</span>;


    <span style="color: rgb(128, 128, 0);">@Override
</span><span style="color: rgb(128, 128, 0);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">protected void </span>onCreate(Bundle savedInstanceState) {
        <span style="color: rgb(0, 0, 128); font-weight: bold;">super</span>.onCreate(savedInstanceState);
        setContentView(R.layout.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">activity_main</span>);

        <span style="color: rgb(128, 128, 128); font-style: italic;">//스플래시
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span>startActivity(<span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Intent(<span style="color: rgb(0, 0, 128); font-weight: bold;">this</span>, SplashActivity.<span style="color: rgb(0, 0, 128); font-weight: bold;">class</span>));

        <span style="color: rgb(128, 128, 128); font-style: italic;">//웹뷰 설정
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView </span>= (WebView) findViewById(R.id.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">web</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getSettings().setJavaScriptEnabled(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
        <span style="color: rgb(128, 128, 128); font-style: italic;">//mWebView.setInitialScale(100);
</span><span style="color: rgb(128, 128, 128); font-style: italic;">        </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.setLayerType(View.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">LAYER_TYPE_HARDWARE</span>, <span style="color: rgb(0, 0, 128); font-weight: bold;">null</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getSettings().setUseWideViewPort(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getSettings().setLoadWithOverviewMode(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.setWebViewClient(<span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>WebViewClientClass());
        <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.loadUrl(<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">MAIN_URL</span>);
    }


    <span style="color: rgb(0, 0, 128); font-weight: bold;">private class </span>WebViewClientClass <span style="color: rgb(0, 0, 128); font-weight: bold;">extends </span>WebViewClient {
        <span style="color: rgb(0, 0, 128); font-weight: bold;">public boolean </span>shouldOverrideUrlLoading(WebView view, String overrideUrl) {
            <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(overrideUrl.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"tel:"</span>) || overrideUrl.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"sms:"</span>) || overrideUrl.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"smsto:"</span>) || overrideUrl.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"mms:"</span>) || overrideUrl.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"mmsto:"</span>) || overrideUrl.startsWith(<span style="color: rgb(0, 128, 0); font-weight: bold;">"mailto:"</span>))

            {

                Intent intent = <span style="color: rgb(0, 0, 128); font-weight: bold;">new </span>Intent(Intent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">ACTION_VIEW</span>,Uri.<span style="font-style: italic;">parse</span>(overrideUrl));

                startActivity(intent);

                <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;

            }

            view.loadUrl(overrideUrl);
            <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
        }
    }



    <span style="color: rgb(128, 128, 0);">@Override
</span><span style="color: rgb(128, 128, 0);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">public boolean </span>onKeyDown(<span style="color: rgb(0, 0, 128); font-weight: bold;">int </span>keyCode, KeyEvent event) {

        <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(keyCode == KeyEvent.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">KEYCODE_BACK</span>) {

            <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(<span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.getOriginalUrl().equalsIgnoreCase(<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">MAIN_URL</span>)) {
                <span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(!<span style="color: rgb(102, 14, 122); font-weight: bold;">mFlag</span>) {
                    Toast.<span style="font-style: italic;">makeText</span>(<span style="color: rgb(0, 0, 128); font-weight: bold;">this</span>, <span style="color: rgb(0, 128, 0); font-weight: bold;">"뒤로 버튼을 한번 더 누르시면 종료됩니다."</span>, Toast.<span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold;">LENGTH_SHORT</span>).show();    <span style="color: rgb(128, 128, 128); font-style: italic;">// 종료안내 toast 를 출력
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                    </span><span style="color: rgb(102, 14, 122); font-weight: bold;">mFlag </span>= <span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>;
                    <span style="color: rgb(102, 14, 122); font-weight: bold;">mHandler</span>.sendEmptyMessageDelayed(<span style="color: rgb(0, 0, 255);">0</span>, <span style="color: rgb(0, 0, 255);">2000</span>);    <span style="color: rgb(128, 128, 128); font-style: italic;">// 2000ms 만큼 딜레이
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                    </span><span style="color: rgb(0, 0, 128); font-weight: bold;">return false</span>;
                } <span style="color: rgb(0, 0, 128); font-weight: bold;">else </span>{
                    <span style="color: rgb(128, 128, 128); font-style: italic;">// 앱 종료 code
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                    </span>moveTaskToBack(<span style="color: rgb(0, 0, 128); font-weight: bold;">true</span>);
                    finish();
                    android.os.Process.<span style="font-style: italic;">killProcess</span>(Process.<span style="font-style: italic;">myPid</span>());
                }
            } <span style="color: rgb(0, 0, 128); font-weight: bold;">else </span>{
                <span style="color: rgb(128, 128, 128); font-style: italic;">// 뒤로 가기 실행
</span><span style="color: rgb(128, 128, 128); font-style: italic;">                </span><span style="color: rgb(0, 0, 128); font-weight: bold;">if </span>(<span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.canGoBack()) {
                    <span style="color: rgb(102, 14, 122); font-weight: bold;">mWebView</span>.goBack();
                    <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
                }
            }
        }
        <span style="color: rgb(0, 0, 128); font-weight: bold;">return true</span>;
    }


}

</pre><p>
 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인