iOS: How to determine Camera view idle time? -


how detect camera / device idle time? in current app, show camera view where-in augmented reality detection happening using third party framework. in scenario, want detect camera view (launched using avcaptureview class apis) idle time, ex: if camera moved direction, don't want operation. if camera view not moved within 10 secs, need operation. want ask, there generic approach identify whether camera view (launched using avcaptureview class apis) or device idle time ?

thank you.

you can use accelrometer determive if there movement within last seconds, if there no considerable movement phone idle

- (void)accelerometer:(uiaccelerometer *)accelerometer didaccelerate:(uiacceleration *)acceleration { if(acceleration.x > somevalue || acceleration.y > somevalue ||acceleration.z > somevalue)      {          nslog(@"you moved phone");      }  } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -