|Android M And A New Android Studio|
|Written by Mike James|
|Monday, 01 June 2015|
From the developer's point of view the biggest news from Google I/O is the new version of Android and Android Studio.
In terms of programming, Android M is a bit of a yawn - unless it has something deep that isn't clear and it is possible that the introduction of data binding might qualify as such, more of this in another news item.
The most important change is that now permissions will be a runtime concern. From now on your app has to request the right to use some resource as and when it needs it. It is also suggested that you should cope with the refusal of permissions. This is very different from the take it or leave it approach of Android up until this point. It seems that you can use the old "permissions on install" model, but moving to the new way of doing things has the advantage that the user is less likely to refuse to install the app.
The only other feature of direct concern to developers is the ability to use app links - i.e. URLs that point at apps. Users benefit from better battery life due to a Doze mode. Essentially the hardware uses motion detection to work out if the phone isn't being used and if so it powers down background tasks. This might cause some problems if your app needs to be kept fresh or woken up from Doze mode. The big feature for Google is Android Pay and Fingerprint - a contactless payment system with fingerprint verification.
There is also a new feature which users can enable to allow multiple windows to show overlapped on the screen. By all accounts this is still very flaky and experimental. However if it ever becomes the default it would change the way we thought about and designed Android apps.
A preview version of Android Studio 1.3 is available - all you have to do is change to the Canary channel. Just when you thought you had moved to a stable environment along comes another beta. In fact it is clear that Android M and Android Studio 1.3 are fairly early betas and don't work at all reliably.
In this case you only need to move to 1.3 if you want to work with Android M. The next release, in about two weeks time, should include the newly announced support for NDK C/C++ development.
The lack of proper NDK suport in Android Studio has been something that has stopped a hard core of programmers from moving to it. Earlier in the year the NDK plugin for Android Studio was deprecated and programmers were simply promised "coming soon". Now it is here and based on JetBrains' CLion platform. It is to be hoped that Google is rewarding JetBrains for creating so much of its software infrastructure.
Obviously the NDK isn't something to be used without a good reason and the only good reasons are speed and efficiency. If you want to write a game or a physics simulation then you might want to move to native code. The new CLion-based facilities will have syntax highlighting editor, with code completion and refactoring, compilers for the usual platforms and built-in debugging.
With the addition of NDK support there really is no reason to stay with the deprecated Eclipse approach to Android.
Other small improvements in 1.3 include the Android Design Support Library to help with creating apps that conform to Material Design and an update to Google Play Services 7.5.
There are also hardware system images for Android M for the Nexus 5, 6, 9 and Player. Notice no Nexus 7, which is a sign that this well-liked device is on its way out as a developer tool.
The only extra things we now need to know is that "M" stands for Milkshake and of course, how long it will be before M is at more than 1% of the user base? It looks as if Lollipop really didn't get a look in before it was replaced. The current timetable is:
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Monday, 01 June 2015 )|