My app is composed by four tab : a webview, and three view with some text/edittext, …
The problem is my app consume a lot of CPU and I don’t understand why, and one of the main problem is when the app is onPause (the user use the home button), my app still use CPU (arround 20%, or even more !) and is battery consuming.
I don’t understand what use so much CPU, so I have two questions :
- How can I know exactly (with eclipse) the process (method, activity…) which use too much CPU ?
- How can I “freeze” with 0 CPU consumption my app when the user press the home button (I suppose is in the onPause method, I try with a finish(), it’s work but when the user go back to my app, he get a FC).
Thanks a lot !
EDIT :
Seems my webview consume the CPU. How can i do to stop this webview during onPause without destroy the webview object ?
I find the solution :
THe javascript content in the webview was the problem. To solve that :
and on Resume,