Android Maps API requires openGL es 2 - android

The Maps v2 documentation states:
Because version 2 of the Google Maps Android API requires OpenGL ES
version 2, you must add a <uses-feature> element as a child of the
manifest element in AndroidManifest.xml:
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>`
This notifies external services of the
requirement. In particular, it has the effect of preventing Google
Play Store from displaying your app on devices that don't support
OpenGL ES version 2.
In fact, it throws an exception if this is not in the manifest. I don't want to filter my app in the store, I plan to keep using the old maps for old devices, and only show the new maps if the required features are present, detected at runtime rather than before installation.
So how do I do that? Does it have to be something like multiple APKs with different manifests?

Final Update
As of 2013/12/20, the Android Dashboard shows that approximately 100% of devices now support OpenGL 2.0+ so this answer is no longer relevant. You may simply require OpenGL ES 2.0+ in your manifest.
Update
This is fixed as of rev 7 of the Google Play Services SDK add-on. It is safe to use <uses-feature android:glEsVersion="0x00020000" android:required="false"/> and to detect OpenGL ES 2.0 at runtime.
Original answer
It appears that the Google Maps Android API v2 requires an explicit <uses-feature android:glEsVersion="0x00020000" android:required="true/> declaration in AndroidManifest.xml so there is no way to deploy Google Maps Android API v2 services without excluding all OpenGL ES 1.x devices. At the time of this writing, Google's Android Dashboard shows that, among 1.1 and 2.0 devices, 90.8% of devices support 2.0.
On a particular device (Motorola XOOM), this code results in supportsEs2 = true:
// Check if the system supports OpenGL ES 2.0.
final ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000;
However, when there is no <uses-feature> declaration in the manifest, MapFragment is throwing a RuntimeException:
Caused by: java.lang.RuntimeException: Google Maps Android API only supports OpenGL ES 2.0 andabove. Please add <uses-feature android:glEsVersion="0x00020000" android:required="true" /> into AndroidManifest.xml
at maps.y.ae.a(Unknown Source)
at maps.y.bu.a(Unknown Source)
at maps.y.p.onCreateView(Unknown Source)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$Stub.onTransact(IMapFragmentDelegate.java:107)
at android.os.Binder.transact(Binder.java:297)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$a.onCreateView(Unknown Source)
at com.google.android.gms.internal.c$4.a(Unknown Source)
at com.google.android.gms.internal.c.a(Unknown Source)
at com.google.android.gms.internal.c.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:884)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1066)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1168)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:280)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
... 22 more
Here's to hoping that an update to the Maps library will remove this limitation so we can deploy a single APK and use runtime APIs to determine whether or not to load the new Google Maps v2 experience or fall back to another compatible solution.

This is fixed and will be release with next release of Maps Android API as mentioned in issue #4699

I had the same problem, looked around and most of the suggested workaround for the emulator didn't work for me. Then i found a post were the Genymotion emulator was suggested. This emulator supports OpenGL ES version 2. It is also much faster than the standard emulator.

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.

java.lang.SecurityException: Method class android.media.IAudioService$Stub$Proxy.isCameraSoundForced[] not available

I'm getting the following error when calling Camera.open(cameraIndex) (Camera 1 API)
MethodInvocationProxy : Exception while calling method public abstract boolean android.media.IAudioService.isCameraSoundForced() throws android.os.RemoteException
java.lang.SecurityException: Method class android.media.IAudioService$Stub$Proxy.isCameraSoundForced[] not available to instant apps
06-18 10:23:43.361 26240-26359/? E/Isotope: UID: [10185] PID: [26240]
MethodInvocationStub : Exception while calling method
isCameraSoundForced
java.lang.SecurityException: Method class
android.media.IAudioService$Stub$Proxy.isCameraSoundForced[] not
available to instant apps
at com.google.android.instantapps.supervisor.ipc.proxies.SandboxEnforcer.enforceUnsupportedPolicy(PG:63)
at com.google.android.instantapps.supervisor.ipc.proxies.SandboxEnforcer.enforceUnsupportedMethodPolicy(PG:17)
at com.google.android.instantapps.supervisor.ipc.ProxyMethodHandler.handleMethod(PG:50)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationStub.onTransact(PG:56)
at android.os.Binder.execTransact(Binder.java:453) 06-18 10:23:43.361
26274-26274/? E/Isotope: UID: [99000] PID: [26274]
MethodInvocationProxy : Exception while calling method public abstract
boolean android.media.IAudioService.isCameraSoundForced() throws
android.os.RemoteException
java.lang.SecurityException: Method class
android.media.IAudioService$Stub$Proxy.isCameraSoundForced[] not
available to instant apps
at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.readReply(PG:39)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.invoke(PG:130)
at java.lang.reflect.Proxy.invoke(Proxy.java:393)
at $Proxy5.isCameraSoundForced(Unknown Source)
at android.hardware.Camera.getCameraInfo(Camera.java:260)
at com.chegg.feature.wizard.camera.CameraActivity.getBackFacingCamera(CameraActivity.java:357)
at com.chegg.feature.wizard.camera.CameraActivity.startCamera(CameraActivity.java:101)
at com.chegg.feature.wizard.camera.CameraActivity.startCameraSafely(CameraActivity.java:79)
at com.chegg.feature.wizard.camera.CameraActivity.onResume(CameraActivity.java:74)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1286)
at android.app.Activity.performResume(Activity.java:6987)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4144)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3360)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
android.hardware.Camera was deprecated in API level 21, while Instant Apps support devices only from API level 23. You need to use android.hardware.camera2 instead.
https://developer.android.com/reference/android/hardware/camera2/package-summary.html
The android.hardware.camera2 package provides an interface to
individual camera devices connected to an Android device. It replaces
the deprecated Camera class.
This issue was addressed in https://issuetracker.google.com/issues/38485484
where Engineers provided the following information:
"Instant apps don't support the old deprecated android.hardware.Camera. They only support the camera2 APIs"
Instant apps have restricted functionality, obviously that method is not supported. You can use InstantApps.isInstantApp() method to determine whether it is installed or instant app and call isCameraSoundForced only for installed.
More info: https://developer.android.com/topic/instant-apps/reference.html
Instant apps run natively on Android O and on previous versions, they use google play services to run. So camera 1 is not supported in instant apps prior to API 26 as they don't run natively. However, you can use Camera 1 api in an instant app on API 26 and till the time Camera 1 api lives I would imagine.
However, I'm using camera 2 api in the instant app and camera 1 api in the installed app.
This is a bug in the current implementation of Google Play Services support of instant apps.
It will be fixed in a future release, at which point the android.hardware.Camera API should function correctly.
Unfortunately I don't have any specifics on the timeframe of the fix being available.

Is Google Play Services for Froyo compatible with Android 2.3 and higher?

In reading the Google Play Services setup documentation, it sounds like Google Play Services for Froyo Rev. 12 should be forwards-compatible with Android 2.3 and above.
However, I'm having issues implementing this in my GPSTest app on Github, which currently includes Google Play Services for Froyo.
If I try to build a project using Google Play Services for Froyo Rev. 12 with the element:
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
...included in the AndroidManifest.xml, I get a build error:
Error: No resource found that matches the given name (at 'value' with value '#integer/google_play_services_version').
This is expected (from my current understanding) because this integer doesn't exist in the Google Play Services for Froyo project (sdk\extras\google\google_play_services_froyo\res\values).
If I remove this element from the manifest, it works fine when building and debugging the app via Eclipse (as I would expect). However, when I export the APK, install on a device (Samsung Galaxy S3 Android 4.3, Google Play Services v4.0.34 - downloading the exported APK from Dropbox), and run, I get the following error on startup, and the app crashes:
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml
does not have the right value. Expected 4030500 but found 0. You must have the
following declaration within the <application> element:
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
at com.google.android.gms.common.b.a(Unknown Source)
at com.google.android.gms.maps.a.bn.a(Unknown Source)
at com.google.android.gms.maps.m.g(Unknown Source)
at com.google.android.gms.maps.m.a(Unknown Source)
at com.google.android.gms.a.b.a(Unknown Source)
at com.google.android.gms.a.b.a(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreate(Unknown Source)
at android.support.v4.app.Fragment.performCreate(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.BackStackRecord.run(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(Unknown Source)
at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(Unknown Source)
at android.support.v4.view.ViewPager.populate(Unknown Source)
at android.support.v4.view.ViewPager.populate(Unknown Source)
at android.support.v4.view.ViewPager.onMeasure(Unknown Source)
at android.view.View.measure(View.java:16848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:16848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:302)
at android.view.View.measure(View.java:16848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2586)
at android.view.View.measure(View.java:16848)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2189)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1352)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1535)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6364)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:561)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5455)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
at dalvik.system.NativeStart.main(Native Method)
I'm using Google Play Services for Froyo Rev. 12, and here's the AndroidManifest.xml with the full version info:
<manifest android:versionName="3.2.65 (834000-30)" android:versionCode="3265130"
package="com.google.android.gms"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"/> </manifest>
Is there a way I can deploy a single APK to Google Play using Google Play Services for Froyo Rev. 12 for Android 2.2 and higher?
Or do I need to deploy two APKs to Google Play (one using Google Play Services for Froyo for Android 2.2, and one using Google Play Services for Android 2.3 and up) if I want to retain support for Froyo?
Has anyone successfully deployed Google Play Services for Froyo on Android 2.3 and up?
You dont need
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
That is for the Up-to-date Google Play Services revision. If you use the "Google Play Services for Froyo" library, then you don't need it.
Now, talking about the other problem. How exactly are you "debugging the app via Eclipse"? Are you using the debug key or your release key? how are you installing the APK inside the device? have you tried to do a uninstall->install? Did you use the ADB install or you uploaded the APK as an Alpha/Beta test? Are you sure that you are installing the right APK?
The answer is yes, Google Play Services for Froyo is forwards compatible with Android 2.3 and higher, and the manifest element isn't needed.
Looks like this issue was actually a bug in the Google Maps app.
A Maps app update started rolling out yesterday (12/12/2013), and my phone installed it today (new version is v7.5.0). After this, the crashing problem on startup magically disappeared. I even went back and tested an old version of the APK from Dropbox that was definitely crashing (just in case my other changes in Eclipse fixed something), and that now works as well.
(Note that you should only be using Google Play Services for Froyo if you're supporting API level 8 - Android 2.2. If your minSdkVersion is >= 9, then you should be using the most recent version of Google Play Services, as no new features are being added to Google Play Services for Froyo.)
It is a weird bug, I solved this problem by this way - just changed android:value="#integer/google_play_services_version" to 3265130.
Create an integer resource seems to solve the problem.
But I ended up bumping into each other.
There is no package "ads.AdActivity".
Even adding the froyo version:
compile 'com.google.android.gms:play-services:3.2.65'
The documentation says nothing about the froyo version:
https://developers.google.com/mobile-ads-sdk/docs/
For me, the java.lang.IllegalStateException seemed to occur because I had previously linked to the full Google Play services (version 22) before changing to Google Play services for Froyo. There must have been some remnant of version 22 left in the build and doing a full clean and rebuild fixed the problem.

Android app, device (Galaxy Mini) not supported

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"/>

Categories

Resources