5

I am working on a camera app using Camera API and after I start my app, in about 3 seconds, my activity goes idle(this is my logcat when activity starts):

18317-18317/com.example.cristi.appname W/Preview﹕ surfaceCreated() 18317-18317/com.example.cristi.appname W/Preview﹕ setFlash() 18317-18317/com.example.cristi.appname W/Preview﹕ surfaceChanged()

---->18317-18317/com.example.cristi.appname I/Timeline﹕ Timeline: Activity_idle id:android.os.BinderProxy@30f1e190 time:11392220

18317-18317/com.example.cristi.appname W/CameraActivity﹕ onPause() 18317-18317/com.example.cristi.appname W/CameraActivity﹕ onResume()

---->18317-18317/com.example.cristi.appname I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@30f1e190 time:11393866

I know it does like that if the screen is locked, but why would it do that when my activity is opened without doing anything else? This annoys me because it affects some things that I want to do in onPause() and onResume() which are called after the first idle. It is strange that a second idle appears after onResume().

Does it have something to do with my phone? I test my app on a Allview P5 Mini and Samsung Galaxy S5. It does like that only on the Samsung, everything is ok on Allview and emulator. I need to mention that the idle doesnt appears all the time, just at some app starts on Samsung.

Does anybody know what happens? Any reference or advice is welcome! Thanks in advance!

Chris
  • 6,105
  • 6
  • 38
  • 55
  • 1
    I'm having kind of the same problem, the most useless log message I have yet seen. – Nisk Nov 17 '15 at 10:48
  • Pretty sure it's just logged upon onResume() or something. Testing on my device shows that it's just called whenever the app starts, starts an activity intent, or goes back to the main activity, etc. Also, the time output it gives happens to be `SystemClock.uptimeMillis()` based on my test, if that's any use to anyone. – Kartik Chugh Aug 19 '16 at 17:24

0 Answers0