Android app, device (Galaxy Mini) not supported - android

My android app is not supported on GalaxyMini (among others). When I look at the features needed by the app (copy/pasted from google play admin console), all seems to be there on the GalaxyMini. I don't understand why it would not be served on GalaxyMini.
NativePlateform armeabi seems not to be the problem as I've tried with a previous apk without this feature requirement and the GalaxyMini is still not supported.
Any idea?
Localized to: default, Dutch, French
Permissions: android.permission.INTERNET, android.permission.ACCESS_FINE_LOCATION, android.permission.CAMERA, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.WAKE_LOCK
Features: android.hardware.camera, android.hardware.camera.autofocus, android.hardware.location, android.hardware.location.gps, android.hardware.screen.landscape, android.hardware.screen.portrait, android.hardware.touchscreen
No main expansion file
No expansion patch file
[8/31/12 10:00:14 AM] : API level: 7-16+
Supported screens: small-xlarge
OpenGL textures: all
Native platforms: armeabi

The galaxy mini does not have android.hardware.camera.autofocus. Its camera is fixed focus. If the feature is not an absolute requirement in your app then you could add android:required="false" to its uses-feature tag.

After many tries, the problem was "android.hardware.camera.autofocus"
GalaxyMini is supposed to support autofocus ont the tech specs. I really wish that the google play developper console tells us which of the manifest settings are used to exclude a device, that would save us a lot of time.
So I just added the following line in the manifest to make it available to galaxy mini (and about 300 other devices!) :
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

Related

Does Android app dynamically change its Target API Level

I have a Xamarin.Forms app targeting Android API Level 30 (Android 11) which had Xamarin.Twilio.AudioSwitch v1.1.3 installed. The app is available in Play Store and was working fine till the time Android 12 was not released.
As soon as Android 12 became available, I got complaints from users using the BLE functionality of the app that they are not able to connect with BLE devices supported by the application.
The Android 12 users were getting the following exception:
java.lang.SecurityException:
at android.os.Parcel.createExceptionOrNull (Parcel.java:2437)
at android.os.Parcel.createException (Parcel.java:2421)
at android.os.Parcel.readException (Parcel.java:2404)
at android.os.Parcel.readException (Parcel.java:2346)
at android.bluetooth.IBluetooth$Stub$Proxy.getRemoteName (IBluetooth.java:5470)
at android.bluetooth.BluetoothDevice.getName (BluetoothDevice.java:1889)
at crc....Adapter_Api21BleScanCallback.n_onScanResult (Native Method)
at crc....Adapter_Api21BleScanCallback.onScanResult (Adapter_Api21BleScanCallback.java:38)
at android.bluetooth.le.BluetoothLeScanner$BleScanCallbackWrapper$1.run (BluetoothLeScanner.java:646)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8641)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1133)
The above exception occurs due to the Android 12 Bluetooth permission changes. But this is required only if the app targets API Level 31. But since my app targets API level 30, I was not expecting these changes to be required in my app.
On investigating the issue, I found out that the issue is due to the native Audio Switch v1.1.3 targeting Android API Level 31 (Android 12) as mentioned here: Twilio Audio Switch v1.1.3 but the Xamarin.Twilio.AudioSwitch v1.1.3 binding library specifies MonoAndroid 9.0 (https://www.nuget.org/packages/Xamarin.Twilio.AudioSwitch/1.1.3) due to which I was able to install it for a project targeting API Level 30.
Does this mean that if the app has a package which targets an Android API Level higher than the app itself, the target API level would be dynamically change to higher API level?
Now the problem that I am facing is that I am not able to get this issue fixed for the users who already have the app installed.
I did a downgrade of Xamarin.Twilio.AudioSwitch to v1.1.2 as the native Audio Switch v1.1.2 library targets Android API Level 30 (Android 11) and found that the issue gets solved for new installations of the app. If a user already using a previous version of my app which had the Audio Switch v1.1.3 package and updates to the latest version of app which is using Audio Switch 1.1.2, the user still faces the above exception.
Is there any way that this can be fixed without making the app target Android API level 31 (Android 12) as that would require significant changes to the app?
Note: Asking the users to reinstall the app is not an option for me.
--- This is only supposed to be needed if you target SDK 31 (but need legacy Bluetooth support), but its worth a try ---
Close solution.
In a text editor, edit file YourProject.Android/Properties/AndroidManifest.xml, with changes below.
Rebuild solution.
CHANGE 1:
Bluetooth permissions, point 4., recommends:
Add android:maxSdkVersion="30" to each declared Bluetooth-related permission. Example from doc's code snippet:
<!-- Request legacy Bluetooth permissions on older devices. -->
<uses-permission android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
Perhaps this will clear whatever the OS is remembering re your app's Bluetooth access.
CHANGE 2 (experiments):
EITHER: REMOVE any Bluetooth permissions that were added in SDK 31. ONLY list permissions that existed in SDK 30.
OR: list the permissions app WOULD need if targeted SDK 31, but add android:maxSdkVersion="30", similar to above.
Also consider point 5.:
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
maybe as:
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:maxSdkVersion="30"
android:usesPermissionFlags="neverForLocation" />
What we are doing here is not standard -- "should" simply be ignored on a "target SDK 30" app -- it is an attempt to get OS to clear something it is remembering related to this app.
Hypothesis is that during OS upgrade, OS noticed which apps were using Bluetooth in a way that required additional permissions [due to Twilio.AudioSwitch v1.1.3], and marked them as needing those additional permissions. But then failing when feature used, because permission not declared in manifest.
No, it can't be changed dynamically you have to change it from gradle by yourself.

Android 9 Pie crash (com.google.android.gms... ClassNotFoundException)

I have a Unity3D game published on Android, and it have worked well so far.
However, the Android Vitals Dashboard is now reporting a lot of crashes. Here's the detailed info:
By Android version: Android 9 4500 100.0%
Stacktrace:
java.lang.Error: FATAL EXCEPTION [Thread-360]
Unity version : 2017.3.1p3
Device model : Google Pixel
Device fingerprint: google/sailfish/sailfish:9/PQ2A.190305.002/5240760:user/release-keys
Caused by
at lt.b (com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
at ls.a (com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:1)
at lu.a (com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:18)
at com.google.android.gms.ads.internal.util.ar.a (com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:10)
at kx.a (com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:7)
at kx.run (com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at ac.loadClass (com.google.android.gms.dynamite_dynamiteloader#16089081#16.0.89 (100400-239467275):4)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
My AndroidResolverDependencies.xml file:
<dependencies>
<packages>
<package>com.android.support:customtabs:[26.0.0, 27.2.0[</package>
<package>com.android.support:support-v4:[26.0.0, 27.2.0[</package>
<package>com.google.android.gms:play-services-ads:17.2.0</package>
<package>com.google.android.gms:play-services-analytics:11.8.0</package>
<package>com.google.android.gms:play-services-base:[10.2.1, 12.1.0[</package>
<package>com.google.android.gms:play-services-location:[10.2.1, 12.1.0[</package>
<package>com.google.firebase:firebase-messaging:[10.2.1, 12.1.0[</package>
</packages>
<files>
<file>Assets/Plugins/Android/android.arch.core.common-1.1.0.jar</file>
<file>Assets/Plugins/Android/android.arch.core.runtime-1.1.0.aar</file>
<file>Assets/Plugins/Android/android.arch.lifecycle.common-1.1.0.jar</file>
<file>Assets/Plugins/Android/android.arch.lifecycle.livedata-core-1.1.0.aar</file>
<file>Assets/Plugins/Android/android.arch.lifecycle.runtime-1.1.0.aar</file>
<file>Assets/Plugins/Android/android.arch.lifecycle.viewmodel-1.1.0.aar</file>
<file>Assets/Plugins/Android/com.android.support.customtabs-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.android.support.support-annotations-27.1.1.jar</file>
<file>Assets/Plugins/Android/com.android.support.support-compat-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.android.support.support-core-ui-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.android.support.support-core-utils-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.android.support.support-fragment-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.android.support.support-media-compat-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.android.support.support-v4-27.1.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-17.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-17.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-17.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-16.0.8.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-impl-16.0.8.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-base-16.1.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-16.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-gass-17.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-location-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-16.3.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-16.3.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-places-placereport-16.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-stats-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-tagmanager-v4-impl-16.0.8.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.auto.value.auto-value-annotations-1.6.jar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-common-16.1.0.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-iid-17.1.2.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-iid-interop-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-measurement-connector-17.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-messaging-17.6.0.aar</file>
</files>
</dependencies>
Target API level: 28
Minimum API level: 16
I've seen a similar thread in Google AdMob's discussion group suggesting to add the following to the AndroidManifest.xml file:
<uses-library android:name="org.apache.http.legacy" android:required="false" />
However:
I'm not sure the problem is caused by any apache-related API.
I'm afraid this will restrict the number of installs in my app since it will be available to a smaller audience in Google Play due to the uses-library declaration.
As per Behavior changes: apps targeting API level 28+
Apache HTTP client deprecation
With Android 6.0, we removed support for the Apache HTTP client.
Beginning with Android 9, that library is removed from the
bootclasspath and is not available to apps by default. To continue using the Apache HTTP client, apps that target Android 9 and above can add the following to their AndroidManifest.xml:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Note: The android:required="false" attribute is required for apps that
have a minimum SDK of 23 or lower, because on devices with API levels
lower than 24, the org.apache.http.legacy library is not available.
(On those devices, the Apache HTTP classes are available on the
bootclasspath.)
As an alternative to using the runtime Apache library, apps can bundle
their own version of the org.apache.http library in their APK. If you
do this, you must repackage the library (with a utility like Jar Jar)
to avoid class compatibility issues with the classes provided in the
runtime.

"error 402: Current Android sdk version doesn't support initialWindow as xml tag" despite SDK 23

I have an old Adobe AIR app that is working just fine on Android, except that it comes out in portrait mode. Without changing the source, just the application descriptor, I would like to fix this. Currently I have:
<application xmlns="http://ns.adobe.com/air/application/2.6">
...
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="preferExternal">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<supports-screens android:normalScreens="true"/>
<application android:enabled="true">
...
Now, if I add this:
<initialWindow>
<aspectRatio>landscape</aspectRatio>
</initialWindow>
...within the inner <application> tag, ADT says:
application.xml: error 402: Current Android sdk version doesn't support initialWindow as xml tag
I tried changing the AIR version (yes, see AIR vs Android below) up to 3.9 with no difference.
If I put it within only the outer <application> I get this error instead:
application.xml(24): error 103: application.initialWindow is an unexpected element/attribute
So I'm guessing I have it in the right spot, but I need to add a version number.
However, after a bit of searching, I could not find documented anywhere which Android SDK version I would need to specify (using "the -platformsdk flag in the ADT command if the element was introduced after Android 2.2").
AIR vs Android
This <initialWindow> thing isn't actually an Android XML tag, but an Adobe XML tag, contrary to Adobe's documentation which says that child elements of the <manifest> tag are "Defined by the Android SDK." (Search for <initialWindow> and you'll find only Adobe AIR docs, not Android SDK docs. Which is too bad, because the latter are pretty good at telling you exactly which version an element was introduced in.)
Update 1: SDK 23.0.1 isn't new enough?
I added the -platformsdk option pointing to the Android SDK, which then complained about missing aadt.exe. Per https://stackoverflow.com/a/16831707 I copied in that from 23.0.1 under build-tools. I still get the same message. I also tried adding within the <manifest> tag <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" />, still the same result.
UPDATE 2: Compiled AndroidManifest.xml has lower Android SDK version!
Using aapt from the Android SDK, I found out that the AIR-made APK, despite the above line in Update 1, contains this:
E: uses-sdk (line=48)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x9
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x13
Update 3: Also true with AIR SDK 19
Although with this difference:
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x17
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x17
Interestingly with SDK 19, the screen orientation is now also defined:
A: android:screenOrientation(0x0101001e)=(type 0x10)0x2
...but of course I want 0 (landscape), not 0x2 (user).
Maybe this could work
<android:screenOrientation="landscape">
I have not used Adobe air,this is just a suggestion
Actually, the initialWindow tag goes within the outermost application tag, as the docs say. At one point I had tried this and gotten an error, but I guess it was a coincidence with something else I was trying. I can confirm this fixes it on AIR 2.6, 3.9, and 19.

Google play configuration to push different APKs for different Android versions

At the moment we have two app versions in production:
as you may see, we have version 1420028 for API levels 19+ and 218 for API levels 7+
Now we've prepared a build for API levels from 16 to 18
We see following error after uploading that build to the GP:
Frankly I can't get what following error message says, it looks grammatically incomplete to me.
This configuration cannot be published for the following reason(s):
It is forbidden that a device upgrading from API levels in range 16-18 to API levels in range 19+ should downgrade from version 1420029 to version 218, which would occur when
Screen layouts containing any of [small#mdpi, small#hdpi, small#xhdpi, small#xxhdpi, normal#mdpi, normal#hdpi, normal#xhdpi, normal#xxhdpi, large#mdpi, large#hdpi, large#xhdpi, large#xxhdpi] and
Features containing all of [android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.screen.PORTRAIT, android.hardware.TOUCHSCREEN, android.hardware.WIFI].
Any way to achieve configuration explained above? Is it a Google Play bug or just me getting something wrong?

Android Market filtering my app for the LG Pecan / Optimus Me / P350

Unsupported devices due to your manifest settings
Pecan(pecan)
Unsupported devices due to your manifest settings
LG-P355(pecanV)
The app has been thoroughly tested on this device and it works fine. This is purely a market filtering issue. Can anyone suggest a strategy to find out which manifest element is causing it to be filtered?
I suspected it was my use of permission.FLASHLIGHT (the Pecan has no flash) but this made no difference:
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
running $./aapt dump badging shows:
uses-permission:'android.permission.FLASHLIGHT'
uses-feature-not-required:'android.hardware.camera.flash'
Developer Console shows:
This application is only available to devices with these features, as defined in your application manifest.
Screen layouts: SMALL NORMAL LARGE XLARGE
Required device features
android.hardware.camera
android.hardware.location.network
android.hardware.wifi
android.hardware.location
android.hardware.location.gps
android.hardware.camera.autofocus
android.hardware.screen.landscape
android.hardware.touchscreen
android.hardware.screen.portrait
This application is available to over 698 devices.
Nothing above should exclude the LG Pecan / P350.
I don't understand why google made it so that you have to publish and save your new APK in order to see what devices are supported, or why the "Device Availability" dialog can't tell you which manifest element resulted in the filtering.
Is my best option really to just keep fiddling with uses-permission and uses-feature, bumping up my version number and publishing a new APK each time until it works?
Here's the relevant bits from the aapt dump:
sdkVersion:'7'
uses-permission:'android.permission.INTERNET'
uses-permission:'android.permission.ACCESS_FINE_LOCATION'
uses-permission:'android.permission.ACCESS_COARSE_LOCATION'
uses-permission:'android.permission.AUTHENTICATE_ACCOUNTS'
uses-permission:'android.permission.GET_ACCOUNTS'
uses-permission:'android.permission.MANAGE_ACCOUNTS'
uses-permission:'android.permission.WRITE_SYNC_SETTINGS'
uses-permission:'android.permission.CAMERA'
uses-permission:'android.permission.FLASHLIGHT'
uses-feature-not-required:'android.hardware.camera.flash'
uses-permission:'android.permission.RECEIVE_BOOT_COMPLETED'
uses-permission:'android.permission.READ_PHONE_STATE'
uses-permission:'android.permission.ACCESS_NETWORK_STATE'
uses-permission:'android.permission.ACCESS_WIFI_STATE'
uses-permission:'android.permission.CHANGE_WIFI_STATE'
uses-permission:'android.permission.VIBRATE'
uses-feature:'android.hardware.camera'
uses-feature:'android.hardware.camera.autofocus'
uses-feature:'android.hardware.location'
uses-feature:'android.hardware.location.gps'
uses-feature:'android.hardware.location.network'
uses-feature:'android.hardware.wifi'
uses-feature:'android.hardware.touchscreen'
uses-feature:'android.hardware.screen.landscape'
uses-feature:'android.hardware.screen.portrait'
I'm targeting Android 2.1+, and haven't specified any screen size requirements in the manifest.

Categories

Resources