Log in or register to post comments

Autofocus doesn't work for Samsung Note7

September 27, 2016 - 2:09am #1

Guys,

 

Autofocus is not working for note7. It works for some other android devices we tested.

We have the following code attached to the arccamera

 

void Start () {

 

  VuforiaBehaviour.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted);

  VuforiaBehaviour.Instance.RegisterOnPauseCallback(OnPaused);

}



private void OnVuforiaStarted()

{

  CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);

  CameraDevice.Instance.SetFlashTorchMode (true);

  Debug.Log ("自动对焦已经开始");

}

private void OnPaused(bool paused)

{

  if (!paused) // resumed

  {

   // Set again autofocus mode when app is resumed

   CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);

   CameraDevice.Instance.SetFlashTorchMode (true);

  }

}

Autofocus doesn't work for Samsung Note7

October 4, 2016 - 1:49am #3

I put that code in a script which I attached to the ARcamera. I managed to have it autofocus once the app starts. However, it does not seem to be willing to autofocus once the app has been minimised and opened again. Any ideas? (Vuforia 6 and Unity 5.3, on a Motorola G4 device).

Autofocus doesn't work for Samsung Note7

October 3, 2016 - 2:01pm #2

Can you try instructions in this post and confirm if device supports continuous autofocus?

https://developer.vuforia.com/forum/vuforia-40/android-camera-continuous-autofocus-not-unsupported#comment-47269

Log in or register to post comments