Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Cloud IR on Android 7.0 (API 24)

Juan Noguera Feb 21, 2017

I have an IR demo App that is working perfectly OK in Android versions from API 19 to 23.
The same App fails on an Xperia Z5 that has been recently updated to Android 7.0 (API 24). It was working well on this same handset before the update.

Is this a known issue? , can I help in any way to get this fixed?


Juan Noguera

Feb 21, 2017

Some extra information about this issue.
This is the logcat output for this issue on an Xperia Z5 with Android 7.0:

---
D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=2106, _sc=MainActivity, _si=-695947216462431025}]
V/FA: onActivityCreated
E/CraftAR Cloud Image Recognition SDK 3.1: CraftARCameraView NOT found! Please, ensure you provided a CraftARCameraView in your layout.
I/CraftAR Cloud Image Recognition SDK 3.1: Build.MANUFACTURER: Sony , Build.MODEL:E6653
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
I/CraftAR Cloud Image Recognition SDK 3.1: Setting collection token to XXXXXXXXXXXXXXXX
I/CraftAR Cloud Image Recognition SDK 3.1: Finder activated
V/FA: Activity resumed, time: 338938333
I/CraftAR Cloud Image Recognition SDK 3.1: setting camera callback with buffer
I/CraftAR Cloud Image Recognition SDK 3.1: couldn't activate autofocus, retry in 1 second
E/CraftAR Cloud Image Recognition SDK 3.1: Error triggering focusautoFocus failed
W/System.err: java.lang.RuntimeException: autoFocus failed
W/System.err: at android.hardware.Camera.native_autoFocus(Native Method)
W/System.err: at android.hardware.Camera.autoFocus(Camera.java:1321)
W/System.err: at com.craftar.CameraThread.triggerFocusInternal(CameraThread.java:676)
W/System.err: at com.craftar.CameraThread.access$700(CameraThread.java:22)
W/System.err: at com.craftar.CameraThread$6.run(CameraThread.java:273)
W/System.err: at android.os.Handler.handleCallback(Handler.java:751)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err: at android.os.Looper.loop(Looper.java:241)
W/System.err: at android.os.HandlerThread.run(HandlerThread.java:61)
W/System.err: at com.craftar.CameraThread.run(CameraThread.java:103)
---

The same code runs OK on a Galaxy S6 with Android 6.0.1. And it was working OK on the Xperia Z5 before it was upgraded to Android 7.0.
The problem seems to be with the SDK trying to activate the autofocus. This fails in Z5, and works OK in all others.

Reported error "CraftARCameraView NOT found!" is not really a problem. The App does have a CraftARCameraView component in the layout and this error is reported with all handsets on which IR works perfectly OK.
0 rated
( Agent )
Luis Martinell

Feb 23, 2017

Can you check the app permissions? Is it possible that the app has not Camera permissions set in the Device’s settings for this app?

0 rated
Juan Noguera

Feb 23, 2017

Thanks for the answer.
The App has all the permissions. I mentioned that it works OK in other handsets.

The problem was solved when I set

compileSdkVersion 25
buildToolsVersion '25.0.1'

in the App's Graddle file.
Fortunately, this setting does not break anything with older versions.
0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?

support@catchoom.com
https://cdn.desk.com/
false
catchoom
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete