2

I am working at a town app , and i have build in a tab5.html wich has 4 phone numbers

<a href="tel://0259944">0259 944</a>

and i have tryed without // too but its now working , what can i do to call When clicking the webview tel link ?

Here is my code i tryed with and withount Intent but its the same problem :( Any one can help me ?

@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

        Bundle args = getArguments();
        int position = args.getInt(ARG_OBJECT);

        int tabLayout = 0;
        switch (position) {
        case 0:
        tabLayout = R.layout.tab1;
        break;
        case 1:
        tabLayout = R.layout.tab2;
        break;
        case 2:
        tabLayout = R.layout.tab3;
        break;
        case 3:
        tabLayout = R.layout.tab4;
        break;
        case 5:
        tabLayout = R.layout.tab6;
        break; 
        case 4:
        tabLayout = R.layout.tab5;
        break; 

        }

        View rootView = inflater.inflate(tabLayout, container, false);

        webView = (WebView) rootView.findViewById(R.id.webView1);
        WebView tab2 = (WebView) rootView.findViewById(R.id.webView2);
        WebView tab3 = (WebView) rootView.findViewById(R.id.webView3);
        WebView tab4 = (WebView) rootView.findViewById(R.id.webView4);
        WebView tab5 = (WebView) rootView.findViewById(R.id.webView5);
        WebView tab6 = (WebView) rootView.findViewById(R.id.webView6);




        if (webView != null) {
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl("file:///android_asset/tab1.html");
        }

        if (tab2 != null) {
            tab2.setWebViewClient(new WebViewClient());
            tab2.loadUrl("file:///android_asset/tab2.html");
            }

        if (tab3 != null) {
            tab3.setWebViewClient(new WebViewClient());
            tab3.loadUrl("file:///android_asset/tab3.html");
            }

        if (tab4 != null) {
            tab4.setWebViewClient(new WebViewClient());
            tab4.loadUrl("file:///android_asset/tab4.html");
            }
        if (tab5 != null) {
            tab5.setWebViewClient(new WebViewClient());
            WebSettings tb5 = tab5.getSettings();
            tb5.setJavaScriptEnabled(true);
            tab5.loadUrl("http://fbhostinger.com/po/map.html");
            }
        if (tab6 != null) {
            tab6.setWebViewClient(new WebViewClient());
            tab6.loadUrl("file:///android_asset/tab5.html");
            Intent intent = new Intent(Intent.ACTION_DIAL);
            startActivity(intent);
            }




        return rootView;
    }
    }
Alex Bonta
  • 45
  • 8

1 Answers1

0

+0259 944 try this above code and your page must be html5 means first line

i had test above link in anrodid an it works fine you may visit it http://www.pulverizerindia.com/