Saturday, December 1, 2012

Notes from Google I/O 2012 session - ” What’s New in Android ( 4.1 ) “


The official page for this session is here . The session is specifically about the latest iteration of the Android OS, i.e. Android 4.1 / JellyBean.

Google has now also made available the entire changelog, which is another good source of information about JellyBean . 

Below are my notes from this session, organized by category.

Performance, Memory
  • Using V’sync + Triple buffering to make overall performance much better ( or much butter - as google likes to call it ! ).
  • Non-editable TextViews use less memory.
  • New Memory inspection APIs introduced for the application to be able to better inspect system memory, and then respond to it.
  • RenderScript updates.
  • Ability to cancel Database queries.
Widgets
  • Android Widgets can now be hosted in third-party launchers.
  • Widgets can respond to size changes. In Android 4.0, while re-sizing widgets was possible, intercepting this event was not possible. However, intercepting this change is now possible with Android 4.1, and consequently you can do stuff like update layouts etc.
  • Widgets can now have different layouts for portrait mode, versus landscape mode.
Layout
  • The new layout called as ‘GridLayout’ which was introduced in Android 4.0 for Activities / Fragments, is now also available for Widgets.
  • GridLayouts were specifically created to solve the problem of deeply nested layouts for certain use cases in a more performant manner. 
  • TextureView : Enhanced SurfaceView essentially.
  • The above layouts are not Android 4.1 specific, but were actually introduced in Android 4.0 .
Animation
  • Multiple Animation related updates to make animations easier.
  • Activity Animation updates. Now, you can easily animate the ‘zooming out’ expansion of activities from a specific point + dimension on the screen. Android 4.1 JellyBean is replete with examples of this functionality / behavior.
ClipBoard
  • ClipBoard can now hold styled text, I.e. Not just raw text.
Navigation
  • Now you can manually create synthetic task stacks ! This is huge in my opinion. Also, this update is available within Google-developed Android compatibility package, which goes all the way back to Android 1.6, so this should be available for us as well.
  • Automatic ‘Up’ navigation support for Activities, in context of Action Bar.
  • Still no official Action Bar support within the Support package. Romain Guy recommended using ActionBarSherlock for this.
Internationalization
  • 18 new locales, support for right to left text – Arabic, Hebrew.
Accessibility
  • Enhanced in a major way. For visually challenged folks, you can perform gestures which will gradually traverse, and describe the various views to you, without looking at the screen. Once you choose the right area / view that you want to interact with, you perform another gesture ( double tap ) anywhere on the screen to execute the action. This way, you don’t have to figure out exactly where to tap. Also included is accessibility support to make complex Custom views more accessible. All of this exists in the support library, and therefore works all the way unto Android 1.6 !
Security , Permissions
  • From now on, Apps that need to use external storage, need to explicitly request for this this permission. While this is not mandatory, at the moment, it will become mandatory in the future.
Networking, Throttling, $
  • Android already supports determing whether user is on a WiFi network, or is using a regular cellphone network. However, this is a coarse-grained approach, for example, what if the user is on a metered Wifi HotSpot network ? In this case, the user can specify which networks are metered, and you can now query this setting from within your application before performing a network-intensive operation. 
MultiMedia
  • Media Codec updates.
  • Audio Latency improvements.
NFC
  • Large payloads over Bluetooth, tap for pairing support.
Play Store
  • You can respond to user comments, but this is for ‘Top Developers’.
  • In-App subscription support.
  • New seller countries.
  • Entire Team can now access Android developer console.
  • Sales report are now available.
  • Android Expansion files -> Initial APK file can be unto 50 MB, and it can then be remotely augmented with extension files unto 4 GB.
  • Incremental APK updates are now available, automatically ! Average saving ( data ) of 66 % per download, per Google stats.
  • Unlocked devices now available directly from Google.
DevTools
  • Emulator is much faster now, to the extent that you can run games on the same with good performance.
  • Can test hardware acceleration, via Emulator.
  • Sensor and multitouch support using physical Android devices. In this case, you actually run you application on the emulator, but can feed all sensor data + multitouch events using a connected Android device for thorough testing.
  • ‘Lint’ Tool for automated checks of your code against Google recommendations.
  • Tracer tool for Open GL ES.
  • Device Monitor Tool. This is basically a newer version of DDMS, with a better UI.
  • System Trace tool.
  • Better NDK support.
  • Support for creating standardized types of Applications.
  • Layout editor updates.
Notifications
  • New attribute introduced – priority. Support for opportunistic notifications. Opportunistic notifications are those which do not appear when the Notification drop-down is unexpanded, but show up once the user has pulled down the notification menu.
  • bigContentView – 256dp tall ( 4 times previous contentViewSize )
  • Notification Actions: you can add upto 3 buttons within your notification, from which the user can perform an action directly. If you want to add more than three buttons, you can use Custom Layouts.
  • Styling updates with regards to Notifications.
  • Notification sort order is first by priority, then by time.
  • Users can now long-tap and find out which application posted a notification. If the user is annoyed by notifications coming from an application, they can just switch off the notifications from just that application.
Comments, questions and feedback are appreciated !

No comments: