Unity3D app using Android device camera with auto-focus issue - android

I am working with a Unity3D app for Augmented Reality that, when deployed to an Android device, uses the camera to perform character recognition.
The tablet’s camera auto-focus no longer works though, so the scanning (character recognition) is really bad.
I am working on a number of hypotheses to find the cause; the first one being the fact that the Camera class was deprecated in API level 21.
When I run the following command in my Terminal, I get 7.0 because my SDK is new from April 2017.
$ adb shell getprop ro.build.version.release
The following snippet exists in the AndroidManifest.xml file in my Unity3D project. If the cause is the old camera class no longer being valid, how should I modify this code in the AppManifest file to fix the problem?
<uses-feature android:glEsVersion='0x00020000'/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true"/>
<uses-feature android:name="android.hardware.camera.front" android:required="true"/>

Related

How to identify Google play apps compatibile with Genymotion?

When I head on Google Play from a virtualized device, several common apps are not available, since they are incompatible with the v-device.
I would like to understand which is the missing device feature. Therefore I downloaded the APK using the cloud service https://apps.evozi.com/ and a compatible device. Then I extracted and decrypted AndroidManifest.xml by means of the Apktool, using:
apktool d myapp.apk
Inside I looked for uses-feature:
grep '<uses-feature' AndroidManifest.xml
which gives:
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
However, OpenGL ES seems supported since Genymotion v2.16.
Where else should I look?
There are several reasons why Apps are not available on Play Store from Genymotion:
Without ARM translation tools, only apps for x86/x86_64 will be available on the store, the others will be hidden
With ARM translation tools, only apps for armv7 will be available (arm64 is not supported by Genymotion)
Genymotion virtual devices are rooted, therefore apps which detect root will also be unavailable from the store
Genymotion uses a custom AOSP rom, apps which detect AOSP roms will be marked as not compatible with the device in the store

AndroidManifest "android.hardware.fingerprint" not working

My app should only be installed on devices that have a fingerprint sensor. (Marshmallow+). In AndroidManifest I have the following code:
<uses-feature android:name="android.hardware.fingerprint" android:required="true" />
However, some devices on Google Play are marked as "incompatible", but do work when the APK is installed manually. Why does this not work as it should?

Android compatible devices with Appcelerator 5.5.1

I've just published an update of my app on Play Store.
The news are essentially coming from Appcelerator that I update from SDK3.5.2 to SDK5.5.1.
My manifest.xml files contains this :
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>
(3 sizes of screen : small, large, xlarge)
My previous version was compatible with every devices listed in the Developper Console (I had android:targetSdkVersion="16"), but now I missed quite half of the devices and I can't figure why.
It seems the Android 4.4 devices (and maybe previous versions) are no more compatible.
What should I look at to fix it ?
It's likely not the version but the features you are using. Easiest way to check is compile your app for either the android emulator or a device then check the build/android folder for the AndroidManifest.xml file. When you look inside you will see what android permissions and features are being asked for by your app.
For example, if you put code to 'place a phone call' in your app, appcelerator would require the android.hardware.telephony feature enabled. So, every tablet on the market would be excluded because they don't have telephony features. You can check out a list of features available in android here: https://developer.android.com/guide/topics/manifest/uses-feature-element.html
Compare the list in your manifest file and see what might be causing the elimination of devices. For example, I use a module for barcode reading that automatically enables autofocus and flash in my manifest. If I publish, again many tablets are excluded because they don't have flash, so I have to manually edit my AndroidManifest file and change the line from:
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera.flash"/>
to
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
Once you have the fixed manifest file you can manually force Appcelerator to use your manifest by copying it into platform/android folder. Realize that you'll need to do this every time you compile for release to the play store.
Ray

How to figure out why an Android device is not compatible with an APK

In the Google Play Developer Console I can check which devices are compatible/supported for my APK. How do I find out why a device is unsupported?
For example, the Google Nexus 7 "tilapia" and "grouper" are not supported. But Nexus 7, Google Nexus 7 "deb" and Google Nexus 7 "flo" are supported.
Is there a way to know which feature in the manifest is causing the problem?
Features:
android.hardware.CAMERA
android.hardware.LOCATION
android.hardware.location.GPS
android.hardware.location.NETWORK
android.hardware.screen.LANDSCAPE
android.hardware.TOUCHSCREEN
API Level 10+
On AndroidManifest.xml:
<uses-permission
android:name="android.permission.CAMERA"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.front"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"/>
This should help. By default, declared permission are required. Nexus 7 (2012) doesn't have front camera, that's why this device isn't compatible.
http://developer.android.com/distribute/googleplay/quality/tablet.html#hardware-requirements
I think it is due to the lack of a rear camera on older nexus 7s. The tilapia and grouper are the 2012 version and have no rear camera (only front camera), flo is 2013 and has both types of camera.

App not coming in ICS market android

I have added these permissions in the android market place.
<!-- Camera -->
<!-- Required to be able to access the camera device. -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
and then i have uploaded the app to Android Market. But my is not visible in the Android 4.0.3 tablet market. But visible in Android HoneyComb market place.
Minsdkversion: 12
Target : 12
Is any thing that i made mistake???
The target sdk version should always be the highest available. So use the 4.1 sdk and set target to 16.

Categories

Resources