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 November 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.
Labels
Android O
Android Studio
Design
Develop
Google Play
Archive
Januar 2021
(1)
Dezember 2020
(7)
November 2020
(7)
Oktober 2020
(7)
September 2020
(9)
August 2020
(18)
Juli 2020
(18)
Juni 2020
(18)
Mai 2020
(4)
April 2020
(7)
März 2020
(9)
Februar 2020
(9)
Januar 2020
(3)
Dezember 2019
(8)
November 2019
(12)
Oktober 2019
(11)
September 2019
(5)
August 2019
(9)
Juli 2019
(8)
Juni 2019
(6)
Mai 2019
(15)
April 2019
(10)
März 2019
(11)
Februar 2019
(5)
Januar 2019
(6)
Dezember 2018
(11)
November 2018
(9)
Oktober 2018
(13)
September 2018
(5)
August 2018
(13)
Juli 2018
(9)
Juni 2018
(16)
Mai 2018
(16)
April 2018
(8)
März 2018
(8)
Februar 2018
(7)
Januar 2018
(9)
Dezember 2017
(9)
November 2017
(13)
Oktober 2017
(14)
September 2017
(11)
August 2017
(19)
Juli 2017
(11)
Juni 2017
(13)
Mai 2017
(21)
April 2017
(12)
März 2017
(14)
Februar 2017
(11)
Januar 2017
(12)
Dezember 2016
(17)
November 2016
(16)
Oktober 2016
(9)
September 2016
(6)
August 2016
(7)
Juli 2016
(12)
Juni 2016
(14)
Mai 2016
(16)
April 2016
(14)
März 2016
(8)
Februar 2016
(8)
Januar 2016
(9)
Dezember 2015
(9)
November 2015
(13)
Oktober 2015
(19)
September 2015
(15)
August 2015
(13)
Juli 2015
(9)
Juni 2015
(8)
Mai 2015
(10)
April 2015
(10)
März 2015
(12)
Februar 2015
(8)
Januar 2015
(3)
Dezember 2014
(9)
November 2014
(13)
Oktober 2014
(11)
September 2014
(6)
August 2014
(2)
Juli 2014
(9)
Juni 2014
(10)
Mai 2014
(4)
März 2014
(4)
Februar 2014
(3)
Januar 2014
(2)
Dezember 2013
(3)
November 2013
(2)
Oktober 2013
(7)
September 2013
(2)
August 2013
(5)
Juli 2013
(5)
Juni 2013
(4)
Mai 2013
(9)
April 2013
(3)
März 2013
(2)
Februar 2013
(3)
Januar 2013
(3)
Dezember 2012
(5)
November 2012
(3)
Oktober 2012
(3)
September 2012
(1)
August 2012
(1)
Juli 2012
(2)
Juni 2012
(5)
Mai 2012
(1)
April 2012
(5)
März 2012
(5)
Februar 2012
(5)
Januar 2012
(5)
Dezember 2011
(7)
November 2011
(7)
Oktober 2011
(5)
September 2011
(5)
August 2011
(3)
Juli 2011
(7)
Juni 2011
(2)
Mai 2011
(5)
April 2011
(6)
März 2011
(8)
Februar 2011
(8)
Januar 2011
(4)
Dezember 2010
(8)
November 2010
(3)
Oktober 2010
(4)
September 2010
(7)
August 2010
(6)
Juli 2010
(10)
Juni 2010
(11)
Mai 2010
(11)
April 2010
(2)
März 2010
(3)
Februar 2010
(2)
Januar 2010
(5)
Dezember 2009
(7)
November 2009
(5)
Oktober 2009
(5)
September 2009
(8)
August 2009
(2)
Juli 2009
(1)
Juni 2009
(2)
Mai 2009
(5)
April 2009
(12)
März 2009
(5)
Februar 2009
(8)
Januar 2009
(3)
Dezember 2008
(3)
November 2008
(1)
Oktober 2008
(4)
September 2008
(6)
August 2008
(4)
Juni 2008
(1)
Mai 2008
(5)
April 2008
(4)
März 2008
(5)
Februar 2008
(2)
Januar 2008
(5)
Dezember 2007
(3)
November 2007
(5)
Feed
Newsletter
Android Developers
Google Play