I am using the CraftAR API for Cloud Image Recognition and encountering no problems, except when testing on a Huawei P8 Lite. On the rest of the devices, pressing the "Scan" button brings back either "Result is ..." or "No results found", but on the Huawei it keeps searching and no answer is brought back. I built the app following the demo. Is there a known problem with Huawei devices?
( Agent )
Jan 18, 2017
What version of Android does the device have? Can you check that the Internet permission is granted for this app?
Can you share the logs from logCat when this happens?
Thank you for your answer. The Huawei device is using Android 5.0.1 and the Internet permission is granted. As I mentioned, the app works properly on other devices (Motorola G 4G, Samsung Galaxy Duos, Samsung Galaxy S7, Vodafone Smart Ultra 7) running Android 5.1, 4.4.4 and 6.0.1.
As for the logs, unfortunately, I don't have access to them, as this problem occurs on the client side. I will try and get a similiar device and post the logs by monday.
I finally managed to get my hands on a Huawei P8 Lite with Android 5.0. It seems that the classes are not recognized, and not only the classes from CraftAR libary, but all of them. Here are some of the logs:
I/art: Can not find class: Landroid/support/v4/view/ViewPager; I/art: Can not find class: Landroid/support/v4/view/PagerAdapter; I/art: Can not find class: Lcom/example/andrei/myapp/utils/Utils; I/art: Can not find class: Lcom/example/andrei/myapp/activities/HomeActivity$1; I/art: Can not find class: Lcom/craftar/CraftARActivity; I/art: Can not find class: Lcom/craftar/ImageRecognition$SetCollectionListener;
There are errors for all the classes in my app, including classes from libraries and classes I created. The problem is everything else works, except the CraftAR scanning activity. Also, I got this error while trying to scan a picture:
E/ScanActivity: Search failed(ERROR_IMAGE_TOO_LARGE):Image file size is too large
Again, the app works on other devices with Android version ranging from 4.4.4 to 6.0.1.
I tried running the app on a Huawei P8 Lite with Android 6.0 and everything worked as expected. Do you think there's a factory problem with the Huawei P8 Lite running Android 5.0?