Code example for Message

Methods: sendToTarget

0
    @Override 
    public void onFormResubmission (WebView view, Message dontResend, Message resend) {
        Log_OC.d(TAG, "onFormResubMission ");
 
        // necessary to grant reload of last page when device orientation is changed after sending a form 
        resend.sendToTarget();
    } 
 
    @Override 
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return false; 
    } 
     
    @Override 
    public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) {
        Log_OC.e(TAG, "onReceivedError : " + failingUrl + ", code " + errorCode + ", description: " + description);
        if (!failingUrl.equals(mLastReloadedUrlAtError)) {
            view.reload();
            mLastReloadedUrlAtError = failingUrl;
        } else { 
            mLastReloadedUrlAtError = null;