Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BaseLayerAndroid creating destroying log messages

I am using a web view within an activity. When i run my app on phone, i am able to see lot of (continous) log messages with Tag BaseLayerAndroid.

02-07 13:29:06.458: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x1a328b8
02-07 13:29:06.505: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x1977130
02-07 13:29:06.560: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x197fa88
02-07 13:29:06.599: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x1a328b8
02-07 13:29:06.653: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x199fbd0
02-07 13:29:06.685: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x197fa88
02-07 13:29:06.755: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x1ba8018
02-07 13:29:06.786: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x199fbd0
02-07 13:29:06.856: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x19c48d0
02-07 13:29:06.903: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x1ba8018
02-07 13:29:06.966: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x1a20a90
02-07 13:29:07.021: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x19c48d0
02-07 13:29:07.067: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x198e480
02-07 13:29:07.099: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x1a20a90
02-07 13:29:07.169: D/BaseLayerAndroid(27721): Creating BaseLayerAndroid = 0x1977140
02-07 13:29:07.216: D/BaseLayerAndroid(27721): Destroying BaseLayerAndroid = 0x198e480

My basic code is:

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.display);


        progress = (ProgressBar) findViewById(R.id.progressBar1);
        webview = (WebView) findViewById(R.id.webView1);
        webSettings = webview.getSettings();
        webSettings.setBuiltInZoomControls(true);
        webSettings.setJavaScriptEnabled(true);
        webview.setWebViewClient(new WebViewClient(){
            @Override
            public void onPageStarted(WebView view, String url, Bitmap favicon) {
                // TODO Auto-generated method stub
                super.onPageStarted(view, url, favicon);
                progress.setActivated(true);
                progress.setVisibility(ProgressBar.VISIBLE);
            }

            @Override
            public void onPageFinished(WebView view, String url) {
                // TODO Auto-generated method stub
                super.onPageFinished(view, url);
                progress.setActivated(false);
                progress.setVisibility(ProgressBar.INVISIBLE);
            }
        });

        new Thread(new Runnable() {
            public void run() {
                webview.loadUrl("some url");
            }
        }).start();

Even when i come out of my activity, showing webview, i keep recieving this log messages. Can anyone help me analyse what these log messages are all about and why are they appearing at such a fast rate.

like image 224
neeraj Avatar asked Feb 07 '13 20:02

neeraj


1 Answers

I have the same problem in a webview (phonegap).

What I found is that the log messages seem to be related to the blinking cursor of a focused textarea.

I have jquery running in the webview and if I do

$('textarea').get(0).blur();

the log messages stop.

That code tells the textarea to stop being focused, and so the cursor stop blinking and so do the log messages (wich seem to flow at the same rate as the blinking of the cursor).

The messages stop also when tapping outside of the textarea, while tapping in the textarea restart the messages.

I know this is not a proper solution, but I hope it can be a hint in the right direction.

like image 93
G_Gus Avatar answered Nov 14 '22 12:11

G_Gus