I am sending message by calling function through `WebView`.

`Toast.makeText` function is working fine ( show alert message) but in same function if i placed send sms code then it doesn't work.

here is my code

```
    public class MyJavaScriptInterface {

    Context mContext;

    MyJavaScriptInterface(Context c) {
        mContext = c;
    }

    @JavascriptInterface
    public void showToast(String toast) {
        Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();
    }
    public void sendsmss(String phoneNumber, String message) {

        SmsManager smsManager = SmsManager.getDefault();
        smsManager.sendTextMessage(phoneNumber, null, message, null, null);

     }

}

```

`WebView` code to call function

```
onClick="AndroidFunction.sendsmss('1234567890','hello world ');"

```

All required classes imported.

I successfully sent sms by placing smsmanager code inside onCreate function