You uploaded an Android App Bundle without 'android:exported' property set - android

I've built and Android App Bundle via Unity using target API level as 32. When I try to upload the .aab file to Google Play, I'm getting this error message:
"You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher."
I can successfully upload .aab files I've created with API level 30, but I want to fully support Android 12 devices. When I try to build with API level 31 or 32, I get this error. I've already added android-exported tag to all activities, and I'm not sure why I keep getting this error. Minimum API Level is set to 21 (setting it to 23 also didn't work).
I'm using Unity 2020.3.30 (also was getting same error when building with Unity 2019.4.12). Also tried to export project and build .aab via Android Studio 4.4.1, but still no luck.
My Android.Manifest file is set as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.unity3d.player" android:versionCode="1" android:versionName="1.0">
<application android:label="#string/app_name" android:icon="#mipmap/app_icon">
<!-- The MessagingUnityPlayerActivity is a class that extends
UnityPlayerActivity to work around a known issue when receiving
notification data payloads in the background. -->
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:exported="true" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:resizeableActivity="false" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<activity android:name="com.facebook.unity.FBUnityLoginActivity" android:exported="false" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:exported="false" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityGamingServicesFriendFinderActivity" android:exported="false" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
<activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
<activity android:name="com.facebook.unity.FBUnityGameRequestActivity" android:exported="false"/>
<activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" android:exported="false"/>
<activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" android:exported="false"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="xxxx" />
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false" />
<meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled" android:value="true" />
<provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProviderxxxx" android:exported="true" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="True" />
<meta-data android:name="unity.allow-resizable-window" android:value="False" />
<meta-data android:name="unity.build-id" android:value="xxxx" />
<receiver android:name="com.unity.androidnotifications.UnityNotificationManager" android:exported="true" />
<receiver android:name="com.unity.androidnotifications.UnityNotificationRestartOnBootReceiver" android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<uses-feature android:glEsVersion="0x00030000" />
<uses-feature android:name="android.hardware.vulkan.version" android:required="false" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>
I've tried methods from answers and comments at other similar questions in StackOverflow, but none of them worked.

Related

Can't sign my Cordova Android app with SDK 31

Trying to upgrade my Cordova app to Android API 31. I can compile it fine but when I try to install a signed version on a device I get
adb: failed to install xyzzy.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl2088675470.tmp/base.apk: AndroidManifest.xml]
I compile the code, use zipalign, apksigner (as I've done for a long time), and then use adb to install to a device.
I've tried both API 31 and 32. I'm using cordova 10.0.0, cordova-android 11.0.0, Java 11, build-tools 31.0.0 and 32.0.0, min sdk version 22, gradle 7.6. I've deleted the app from the device, run "./gradlew clean" many times. I have not changed the signing key. I downloaded fresh copies of the 20 or so plugins I use.
Ran "jarsigner -verify" and got a lot of output, appears to be signed correctly.
I can install an unsigned version to a device, but not a signed one.
Any advice?
Thanks, Jon
My AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="23005" android:versionName="2.30.5" package="com.xyzzy.xyzzy" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:supportsRtl="true" android:usesCleartextTraffic="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:exported="true" android:label="#string/activity_name" android:launchMode="singleInstance" android:name="MainActivity" android:screenOrientation="portrait" android:theme="#style/Theme.App.SplashScreen" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" />
<service android:exported="false" android:name="org.apache.cordova.firebase.FirebasePluginMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver android:name="org.apache.cordova.firebase.OnNotificationOpenReceiver" />
<activity android:excludeFromRecents="true" android:exported="true" android:name="org.apache.cordova.firebase.OnNotificationReceiverActivity" android:noHistory="true" android:taskAffinity="" android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="#color/accent" />
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="#string/default_notification_channel_id" />
<meta-data android:name="firebase_analytics_collection_enabled" android:value="true" />
<meta-data android:name="firebase_performance_collection_enabled" android:value="true" />
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="true" />
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="true" />
<provider android:authorities="${applicationId}.emailcomposer.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.emailcomposer.Provider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/emailcomposer_provider_paths" />
</provider>
<provider android:authorities="${applicationId}.localnotifications.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.plugin.notification.util.AssetProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/localnotification_provider_paths" />
</provider>
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.TriggerReceiver" />
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver" />
<activity android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClickReceiver" android:theme="#style/Theme.AppCompat.NoActionBar" />
<receiver android:directBootAware="true" android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
<intent-filter>
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
</manifest>
Figured it out!
Now Cordova compiles produce .aab files, I need to use bundletools to sign the app and then unzip the .apks file to create the .apk file.

Hi guys! Why google does not accepting my abb file?

Google does not accept my abb file " You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported " Everywhere says add " android:exported="true" " for them it works, but mine does not work for some reason. My Unity version is 2021.3.9f1 and Android studio 2021.2.1 patch 2. What could be the problem? Am I doing something wrong?
This is my android manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.unity3d.player" android:versionCode="1" android:versionName="1.0">
<application android:label="#string/app_name" android:extractNativeLibs="true" android:icon="#mipmap/app_icon"
tools:targetApi="m">
<!-- The MessagingUnityPlayerActivity is a class that extends
UnityPlayerActivity to work around a known issue when receiving
notification data payloads in the background. -->
<activity
android:name="com.google.firebase.MessagingUnityPlayerActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
android:resizeableActivity="false"
android:hardwareAccelerated="false"
tools:targetApi="n"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="android.notch_support" android:value="true" />
</activity>
<service android:name="com.google.firebase.messaging.MessageForwardingService"
android:permission="android.permission.BIND_JOB_SERVICE">
</service>
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="True" />
<meta-data android:name="unity.launch-fullscreen" android:value="True" />
<meta-data android:name="unity.allow-resizable-window" android:value="False" />
<meta-data android:name="notch.config" android:value="portrait|landscape" />
</application>
<uses-feature android:glEsVersion="0x00020000"
tools:ignore="ManifestOrder" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>
No error
enter image description here

Few supported devices on Google Play Console

I have created an app which needs camera permission and uses the package AR Foundation (AR Core) with Unity. When uploading the build to Google Play Console it says that only 240 devices are supported, when previous apps I have released has 10 000+. What can I do to support more devices?
The only difference between this app and previous successful apps is that this one requires access to camera and uses the AR Core package.
I have a minimum required API level of 24 which is stated in the Google AR documentation.
I changed every uses-feature in the android manifest file to false:
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
android:minSdkVersion="24"
android:targetSdkVersion="30" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-feature android:glEsVersion="0x00030000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen.multitouch"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen.multitouch.distinct"
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.camera.ar"
android:required="false" />
<uses-feature
android:name="com.google.ar.core.depth"
android:required="optional" />
<queries>
<package android:name="com.google.ar.core" />
</queries>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:extractNativeLibs="true"
android:icon="#mipmap/app_icon"
android:label="#string/app_name" >
<activity
android:name="com.unity3d.player.UnityPlayerActivity"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
android:hardwareAccelerated="false"
android:launchMode="singleTask"
android:screenOrientation="landscape"
android:theme="#style/UnityThemeSelector" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="unityplayer.UnityActivity"
android:value="true" />
</activity>
<meta-data
android:name="unity.splash-mode"
android:value="0" />
<meta-data
android:name="unity.splash-enable"
android:value="True" />
<meta-data
android:name="unity.build-id"
android:value="23094d1f-7ffd-4f03-8914-045a212a3e8c" />
<meta-data
android:name="unityplayer.SkipPermissionsDialog"
android:value="true" />
<meta-data
android:name="com.google.ar.core"
android:value="required" /> <!-- The minimal version code of ARCore APK required for an app using this SDK. -->
<meta-data
android:name="com.google.ar.core.min_apk_version"
android:value="202940000" /> <!-- This activity is critical for installing ARCore when it is not already present. -->
<activity
android:name="com.google.ar.core.InstallActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:excludeFromRecents="true"
android:exported="false"
android:launchMode="singleTop"
android:theme="#android:style/Theme.Material.Light.Dialog.Alert" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="false"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
</application>

How To Avoid Google Play Services Update Required Warning

I'm using Google Maps in my Android app and I'm seeing the following message on some older devices:
I understand the nature of this message and that updating will resolve this issue.
However I would like to avoid users seeing this all together, and just want the map to load on all devices.
Here's what my dependencies look like:
Please note that I added individual parts of Google Play services that I needed rather than the full library as I started receiving an error from Android Studio about too many lines of code - this was the work around as I just have to many libraries as it seems.
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.android.vending.BILLING" />
<!-- Creating Permission to receive Google Maps -->
<permission android:name="com.xyzapp.it.supportmapfragment.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<!-- Permission to receive Google Maps -->
<uses-permission android:name="com.xyzapp.it.supportmapfragment.permission.MAPS_RECEIVE"/>
<!-- Permission to read Google Services -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--Maps API needs OpenGL ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<supports-screens
android:anyDensity="true"
android:resizeable="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:name=".xyzappitApp"
android:hardwareAccelerated="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" android:largeHeap="true" >
<activity android:name=".SplashActivity" android:screenOrientation="portrait" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TabHostActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:icon="#drawable/app_icon" android:exported="true" />
<activity android:name=".StatusActivity" android:screenOrientation="portrait" />
<activity android:name=".StatusDetailsActivity" android:screenOrientation="portrait" />
<activity android:name=".MyAlertsActivity" android:screenOrientation="portrait" />
<activity android:name=".AlertLinesActivity" android:screenOrientation="portrait" />
<activity android:name=".AlertDetailsActivity" android:screenOrientation="portrait" />
<activity android:name=".PreferencesActivity" android:screenOrientation="portrait" android:theme="#style/ActionBarStyle" />
<activity android:name=".RouteListActivity" android:screenOrientation="portrait" />
<activity android:name=".StopListActivity" android:screenOrientation="portrait" />
<activity android:name=".StopTimesActivity" android:screenOrientation="portrait" />
<activity android:name=".UpgradeActivity" android:screenOrientation="portrait" />
<activity android:name=".TransfersActivity" android:screenOrientation="portrait" />
<activity android:name=".TransfersDetailsActivity" android:theme="#style/MyDialog" android:screenOrientation="portrait" />
<activity android:name=".ShareActivity" android:theme="#style/MyDialog" android:screenOrientation="portrait" />
<activity android:name=".ShareDetailsActivity" android:theme="#style/MyDialog" android:screenOrientation="portrait" />
<activity android:name=".MapActivity" android:configChanges="orientation|keyboardHidden" />
<activity
android:name="com.mopub.mobileads.MoPubActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.common.MoPubBrowser"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<service android:name=".Service.NotificationService" />
<receiver android:name="com.xyzapp.it.Receiver.MyAlarmReceiver" />
<receiver android:name="com.xyzapp.it.Receiver.ConnectionChangedReceiver" android:exported="false">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<receiver android:name="com.xyzapp.it.Receiver.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<uses-library android:name="com.google.android.maps" />
<meta-data android:name="com.crashlytics.ApiKey" android:value="123456" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="123456" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="#xml/global_tracker" />
</application>
Ideally I would like to know how to have the map just load and not force the user to update as my minSDK=10 and the app supports Android 2.3 devices and up.
Even if that means targeting a lower version of Google Play services to support SDK 10+ I'm ok with that solution.
Thanks!
However I would like to avoid users seeing this all together, and just want the map to load on all devices.
Then don't use Maps V2. Instead, use some other mapping solution (e.g., Open Street Map).
Otherwise, there is no "magic" dependency that will avoid this dialog on all devices. While you are welcome to use some older version of that play-services-maps dependency, there is no guarantee that ~1.5 billion devices will all support that particular version of the Play Services engine without any updates.

watchface service not showing on square devices

I'm developing a Watchface (for AndroidWear), which works perfectly on round emulators and real devices, but I can't select the Watchface-Service on a square emulator.
Following a snippet of my AndroidManifest.xml:
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.DeviceDefault" >
<service
android:name=".WatchFaceService"
android:label="#string/app_label"
android:allowEmbedded="true"
android:taskAffinity=""
android:permission="android.permission.BIND_WALLPAPER" >
<meta-data
android:name="android.service.wallpaper"
android:resource="#xml/watch_face" />
<meta-data
android:name="com.google.android.wearable.watchface.preview"
android:resource="#drawable/preview_square" />
<meta-data
android:name="com.google.android.wearable.watchface.preview_circular"
android:resource="#drawable/preview_circular"/>
<meta-data
android:name="com.google.android.wearable.watchface.companionConfigurationAction"
android:value="com.example.android.wearable.watchface.CONFIG_ANALOG" />
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
</intent-filter>
</service>
</application>
I searched for misspellings, but I couldn't find any.
Ok, so as i figured out: I have to use at least Lollipop.

Categories

Resources