Hi.
Try as I might I can't get the Screen.sleepTImeout to change to SleepTimeout.SystemSetting.
I've tried calling both ResetSleepMode and setting the sleepTimeout manually every frame but it is never staying set.
if (Screen.sleepTimeout != SleepTimeout.SystemSetting) { Debug.Log ("Reset sleep mode from update "); QCARRuntimeUtilities.ResetSleepMode (); Screen.sleepTimeout = SleepTimeout.SystemSetting; }
Battery usage is a genuine concern for my project so not being able to AT LEAST dim the screen is annoying to say the least.
There has been another thread on this topic but appeared not to have a resolution. So from that thread,
Yes, Vuforia forces this setting on startup, although afaik, this is not new in 2.8. However, you can re-set this setting in the OnInitialized callback of the ITrackerEventHandler interface (you just need to implement a script implementing such interface and attch it to the ARCamera). We even expose Utility functions to do that:QCARRuntimeUtilities.DisableSleepMode()QCARRuntimeUtilities.ResetSleepMode()
I tried the advice in this thread to no avail.
Any help would be greatly appreciated.
Scott
- Development OS (Mac OS X, Windows, Linux): OSX - Mobile OS and Version: 8.2 - Mobile Device Manufacturer and Model name: iPad Air 2 - Do the Vuforia Sample Applications show the same behavior?:
QCARRuntimeUtilities.ResetSleepMode()m not working?
Hi,
the old thread you refer to, suggests that you should call ResetSleepMode() in the ITrackerEventHandler OnInitialized callback;
QCARRuntimeUtilities.ResetSleepMode()m not working?
Thanks for your reply. Yes I tried the OnInitialized callback.
QCARRuntimeUtilities.ResetSleepMode()m not working?
Back to my previous message:
you can try
QCARRuntimeUtilities.ResetSleepMode()m not working?
Thanks again but still not working for me at least.
QCARRuntimeUtilities.ResetSleepMode()m not working?
The script in question is attached to the ARCamera btw.....so that could possibly have some order-of-initialisation issues??
QCARRuntimeUtilities.ResetSleepMode()m not working?
That should not matter; in fact, it is OK to attach the script to the ARCamera; as long as you use the QCARStarted callback as per previous posts;
Have you also checked your device settings ?
QCARRuntimeUtilities.ResetSleepMode()m not working?
My auto-lock was set to 2 mins.
QCARRuntimeUtilities.ResetSleepMode()m not working?
I've just tried this (attached to the ARCamera):
QCARRuntimeUtilities.ResetSleepMode()m not working?
hi again, so for slow reply. Hectic times.
QCARRuntimeUtilities.ResetSleepMode()m not working?
Would the screen NOT dim because I'm connected to the debugger I wonder (out lou