Question

My steps:

  1. create log

@Override

protected void onPause() {
    Log.e("on Pause", "onPause");
    super.onPause();
  1. Start application
  2. Click home on keyboard
  3. Start another application (choose in down bar)

As a result, log do not appears. Is it possible?

Update: There was problem with Log Cat - not all logs appears

Était-ce utile?

La solution

Your code is correct but perhaps the way you are looking for the log entry is incorrect. Are you using logcat in a terminal or in an ide? The tag you are using for the log message "on Pause" is a little bit odd.

Make sure you are not filtering your log level in logcat beyond error (unlikely but possible). I recomend setting your logcat filtering to "verbose". If you are using a terminal you can grep for "onPause" if there is a lot of noise in your log dump.

Autres conseils

No. When you execute googleTV home (step 2 in your question), onPause log will appear.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top