Jetpack
Kotlin
Docs
News
Platform
Android Studio
Google Play
Jetpack
Kotlin
Docs
News
Platform
Android Studio
Google Play
Jetpack
Kotlin
Docs
News
More
Android Developers Blog
The latest Android and Google Play news for app and game developers.
API 23 SDK now available for Android Wear
18 noviembre 2015
Posted by
Wayne Piekarski
, Developer Advocate
The new
LG Watch Urbane 2nd Edition LTE
is the first watch to run Android 6.0 Marshmallow (
API 23
) for Android Wear. Currently, all other Android Wear watches implement API 22, and in the coming months, these will receive an OTA update for API 23 as well.
So what does this mean for you as an Android Wear developer? You will need to ensure that your apps are compatible with both API 23 and API 22 watches. While you can start implementing the new features in this post, you still need to maintain backwards compatibility until all watches are upgraded.
New permissions model and samples
API 23
introduces
a new runtime permissions model for both phones and watches. The new permissions model allows users to pick and choose which permissions to grant apps at the time of use. In addition, new permissions settings allow users to turn on and off app permissions at any time.
To use the new permissions model on Wear, read
Permissions on Android Wear
. This training guide provides an in-depth discussion of Wear-specific scenarios, such as when your Wear app relies on a phone-side permission. In addition, all of the Android Wear
samples
have been updated to use the new permissions model, and a new
RuntimePermissionsWear
sample shows how to handle permission requests across devices.
When you are ready, you can update your application on both the phone and watch side to use
compileSdkVersion
23 and
targetSdkVersion
23. Make sure that you check and
request
the permissions needed by your app at runtime, on both the phone and the watch. It is important that you do not change targetSdkVersion to 23 until you have implemented the permission checks properly, since it changes how the system installs and runs the app. For example, an API call that might have previously returned a result could now fail, causing the app to behave in unexpected ways.
-round and -notround resource qualifiers
API 23 makes it easier to build apps for both round and square Android Wear watches. We listened to your feedback and added new resource qualifiers for -round and -notround, so you can use the resource system to load the appropriate images, layouts, and strings based on the type of watch you are working with. You can also combine this with existing resource qualifiers -hdpi, -tvdpi, -280dpi, and -360dpi for the various Android Wear watches that are currently available. All of the existing classes in the
wearable UI library
, such as
WatchViewStub
,
BoxInsetLayout
, and
WearableFrameLayout
will continue to work as well, so you do not need to change your code. The -round and -notround resource qualifiers will not work on API 22 devices, so you cannot assume they will be available until all devices are on API 23.
Watches with speakers
The
LG Watch Urbane 2nd Edition LTE
is the first watch to include speaker support, so you can now add sounds to your Wear app. You can play audio files using the same APIs that are available on Android phones, such as
AudioTrack
,
MediaPlayer
, and
ExoPlayer
. Check out the
sample
and
documentation
to learn how to detect when the speaker is available on a Wear device and play sounds through it.
Intel x86 support
The new
TAG Heuer Connected
, along with other upcoming Android Wear watches, is based on Intel x86 processors. If you are working only with Java code, your apps will automatically work on any architecture. However, if you’re using the NDK, you’ll need to provide both armeabi-v7a and x86 shared libraries in your wearable APK. Since only one wearable app can be bundled in a phone app, it is not possible to deliver different APKs to different watches based on architecture. If your wearable APK is missing an x86 library, it will fail to install on x86 watches with INSTALL_FAILED_NO_MATCHING_ABIS and code -113.
If you are using Android Studio, you will need to adjust your build.gradle file to include:
ndk { abiFilters = ['armeabi-v7a','x86'] }
If you are using the NDK directly, you will need to modify your Application.mk file to use:
APP_ABI := armeabi-v7a x86
These changes should only be made for the wearable APK, and you can continue to support other ABIs on the phone side. You can test your application by checking if it works on the x86 emulator provided by the SDK Manager.
Updated emulator
New Android Wear emulator images for API 23 and x86 watches are available to download from the SDK Manager in Android Studio. We have also added profiles that represent every available Android Wear watch, so you can easily test on any device you want. It is also important that you understand and test all the combinations of phones (API <= 22, API = 23) and wearables (API 22, API 23), so that your app works for all users.
Updates to existing watches
The new emulator images allow you to get started immediately with testing and deploying updated apps for users with API 23 watches. The schedule for updating existing Android Wear watches via OTA updates has not been announced yet. We will announce the update schedule on the
Android Wear Developers Google+ community
. We’ll also let you know when the rollout is complete, and API 22 support for Android Wear is no longer needed.
Etiquetas
Android O
Android Studio
Design
Develop
Google Play
Archive
enero 2023
(4)
diciembre 2022
(8)
noviembre 2022
(22)
octubre 2022
(23)
septiembre 2022
(13)
agosto 2022
(10)
julio 2022
(6)
junio 2022
(10)
mayo 2022
(21)
abril 2022
(8)
marzo 2022
(16)
febrero 2022
(9)
enero 2022
(6)
diciembre 2021
(8)
noviembre 2021
(4)
octubre 2021
(15)
septiembre 2021
(11)
agosto 2021
(7)
julio 2021
(15)
junio 2021
(9)
mayo 2021
(18)
abril 2021
(10)
marzo 2021
(12)
febrero 2021
(11)
enero 2021
(3)
diciembre 2020
(7)
noviembre 2020
(7)
octubre 2020
(7)
septiembre 2020
(9)
agosto 2020
(18)
julio 2020
(18)
junio 2020
(18)
mayo 2020
(4)
abril 2020
(7)
marzo 2020
(9)
febrero 2020
(9)
enero 2020
(3)
diciembre 2019
(8)
noviembre 2019
(12)
octubre 2019
(11)
septiembre 2019
(5)
agosto 2019
(9)
julio 2019
(8)
junio 2019
(6)
mayo 2019
(15)
abril 2019
(10)
marzo 2019
(11)
febrero 2019
(5)
enero 2019
(6)
diciembre 2018
(11)
noviembre 2018
(9)
octubre 2018
(13)
septiembre 2018
(5)
agosto 2018
(13)
julio 2018
(9)
junio 2018
(16)
mayo 2018
(16)
abril 2018
(8)
marzo 2018
(8)
febrero 2018
(7)
enero 2018
(9)
diciembre 2017
(9)
noviembre 2017
(13)
octubre 2017
(14)
septiembre 2017
(11)
agosto 2017
(19)
julio 2017
(11)
junio 2017
(13)
mayo 2017
(21)
abril 2017
(12)
marzo 2017
(14)
febrero 2017
(11)
enero 2017
(12)
diciembre 2016
(17)
noviembre 2016
(16)
octubre 2016
(9)
septiembre 2016
(6)
agosto 2016
(7)
julio 2016
(12)
junio 2016
(14)
mayo 2016
(16)
abril 2016
(14)
marzo 2016
(8)
febrero 2016
(8)
enero 2016
(9)
diciembre 2015
(9)
noviembre 2015
(13)
octubre 2015
(19)
septiembre 2015
(15)
agosto 2015
(13)
julio 2015
(9)
junio 2015
(8)
mayo 2015
(10)
abril 2015
(10)
marzo 2015
(12)
febrero 2015
(8)
enero 2015
(3)
diciembre 2014
(9)
noviembre 2014
(13)
octubre 2014
(11)
septiembre 2014
(6)
agosto 2014
(2)
julio 2014
(9)
junio 2014
(10)
mayo 2014
(4)
marzo 2014
(4)
febrero 2014
(3)
enero 2014
(2)
diciembre 2013
(3)
noviembre 2013
(2)
octubre 2013
(7)
septiembre 2013
(2)
agosto 2013
(5)
julio 2013
(5)
junio 2013
(4)
mayo 2013
(9)
abril 2013
(3)
marzo 2013
(2)
febrero 2013
(3)
enero 2013
(3)
diciembre 2012
(5)
noviembre 2012
(3)
octubre 2012
(3)
septiembre 2012
(1)
agosto 2012
(1)
julio 2012
(2)
junio 2012
(5)
mayo 2012
(1)
abril 2012
(5)
marzo 2012
(5)
febrero 2012
(5)
enero 2012
(5)
diciembre 2011
(7)
noviembre 2011
(7)
octubre 2011
(5)
septiembre 2011
(5)
agosto 2011
(3)
julio 2011
(7)
junio 2011
(2)
mayo 2011
(5)
abril 2011
(6)
marzo 2011
(8)
febrero 2011
(8)
enero 2011
(4)
diciembre 2010
(8)
noviembre 2010
(3)
octubre 2010
(4)
septiembre 2010
(7)
agosto 2010
(6)
julio 2010
(10)
junio 2010
(11)
mayo 2010
(11)
abril 2010
(2)
marzo 2010
(3)
febrero 2010
(2)
enero 2010
(5)
diciembre 2009
(7)
noviembre 2009
(5)
octubre 2009
(5)
septiembre 2009
(8)
agosto 2009
(2)
julio 2009
(1)
junio 2009
(2)
mayo 2009
(5)
abril 2009
(12)
marzo 2009
(5)
febrero 2009
(8)
enero 2009
(3)
diciembre 2008
(3)
noviembre 2008
(1)
octubre 2008
(4)
septiembre 2008
(6)
agosto 2008
(4)
junio 2008
(1)
mayo 2008
(5)
abril 2008
(4)
marzo 2008
(5)
febrero 2008
(2)
enero 2008
(5)
diciembre 2007
(3)
noviembre 2007
(5)
Feed
Newsletter
Android Developers
Google Play