Musings on Android 4.3
Every time a new Android release ships, I scan the scattered sources of information ( the release notes, the other release notes, the other other release notes, and the API differences report), to see what I need to address in the near future. Based on the announcement event broadcast, plus the documenation updates, here are my thoughts.
What Has Me Worried?
These are things that make me nervous in terms of compatiblity for existing apps running on Android 4.3 devices as they become available:
-
The release notes indicate that “the renderer can also now use multithreading across multiple CPU cores to perform certain tasks”. One hopes that this is purely in framework code and therefore the vast majority of Android apps will not find themselves with multithreading problems where none existed previously. However, the more you have been diving into the innards of rendering logic, the more I’d be concerned and seeking more details about this change.
-
While the “restricted profiles” (i.e., secondary accounts with locked-down capabilities) hold great promise, the fact that users may not have access to “ordinary” apps will break many apps that use common implicit
Intents
likeACTION_VIEW
andACTION_SEND
. More importantly, the workaround suggested by the other release notes may itself be flawed, particularly on devices that have HTC-style workarounds for dealing with various Apple patent-related issues. I would not be the least bit surprised if we have to create some sort ofsafeStartActivity()
utility method that can try to handle this sort of thing. -
If you write app wigets, home screen replacements, or input method editors, be sure to check out the new
<uses-feature>
elements. Android is gearing up for some crop of devices where these things either do not exist or are not replaceable, and therefore you need to advertise that your app is only usable on devices that offer such things. -
If you have been doing bizarre stuff like running
setuid
programs from your Android app, be prepared for possible grief.
What Has Me Excited?
Here are some things that I found particularly intriguing about Android 4.3:
-
The ability to record video from a
Surface
opens up tantalizing possibilities for being able to “screencast” an app without having to fuss around with external hardware like HDMI-based recorders. -
The improved
KeyChain
and new keystore provider could prove very useful for secure credential storage. -
I look forwards to experimenting more with the new
Systrace
.
What Else Is On My Short List?
Here are some other things I see that I will want to cover somewhere in the next couple of book updates:
-
Four years after I introduced the
WakefulIntentService
, Google has released theWakefulBroadcastReceiver
, designed for a similar role. Their approach is a bit more flexible, at the cost of being a bit more likely to be screwed up. I will write a sample and show pros and cons of the approaches, plus perhaps augmentWakefulIntentService
with any improvements I see from examining theWakefulBroadcastReceiver
code. And, unlike Facebook’s attempt to claim trademark rights on all terms beginning with “face”, I will generously grant Google the right to use the “Wakeful” prefix royalty-free… :-) -
There is a new
FileProvider
in the Android Support library that appears to offer an out-of-the-box solution for serving simple files from your app’s internal storage to other apps, saving us from having to roll our own. At the same time, there is a newStrictMode
option to yelp if we try sharing afile://
Uri
with another app. -
I am betting that Google wishes they had gone with a different naming convention for ultra-high-density screens, now that we have
DENSITY_XXXHIGH
(insert your favorite “optimized for pr0n” joke here) -
Of the “major” additions in Android 4.3, the one I am most likely to cover soonest is the restricted profile feature, in large part because it’s the biggest change that is in the area of “standard” Android development (versus media changes, Bluetooth changes, OpenGL changes, etc.)
-
I will add some basic coverage of the new
ActionBar
backport in the Support Library. However, I do not intend to switch any existing samples over to use it in the near term. Instead, I am anticipating rewriting the tutorials to support API Level 14+ sometime in 2014, as Gingerbread fades into the distance. -
Activities can declare themselves as “immersive” via
android:immersive
andsetImmersive()
, which will limit the interruptions fromNotifications
. I will need to figure out what that really means in practice.