Android N: how Google "tightens the screws"

    In March this year, the first preview version of Android N was presented. So far, it exists in beta and the final release date has not yet been determined (presumably the OS will be released in the second half of 2016). We talked about the main innovations and trends now, at the beta stage, which can be traced in the update, with Denis Neklyudov, Russia's first Android Google Developer Expert . And for those who want to meet in person, Denis will speak at the Mobius 2016 conference on June 4 in St. Petersburg.



    - Hello! Please tell us briefly about yourself and your work.

    - Good day! My name is Denis Neklyudov. I work for a small company developing mobile applications for financial institutions and startups. In the company I occupy the position of team-lead, specializing specifically in the development for Android.
    In addition to the main work, I’m participating in the recording of the Android Dev podcast , where my colleagues and I talk in detail about Google technologies and development in general.

    - What does your Google Developer Expert mean? What does he give you professionally?

    - I got the status of Google Developer Expert a year ago. As conceived by Google, the main task of the GDE expert is to connect the creators of the company's technologies and ordinary developers who use these technologies. Accordingly, an expert can use early access to new company developments, has certain privileges when speaking at conferences, etc.
    Personally, my GDE status allows me to quickly receive information about technologies that affect my professional activity. I use this both in work and when recording releases of Android Dev. And also to engage in my favorite hobby: to share knowledge with people at conferences, in podcasts and in articles.

    - Surely you already had a chance to work with preview versions of Android N. What is your opinion about the update as a developer?

    - It’s too early for a full-fledged impression, as only the second technical preview version has been released so far, far from the final release. But the main features and ideas embedded in the update are already visible.
    I can’t say that Android N is an update that globally changes, breaks or brings something to the platform. This is another full-fledged annual update, adding missing details and improving existing elements, like last year's Marshmallow.

    - The new version of Android N announced a lot of innovations. How relevant are they for the current level of hardware development for mobile devices?

    - There are no innovations that determine the heavy loads on hardware (in particular, the processor and video card) in the new Android. Yes, multi-window mode has appeared, but Android devices have been working in a multi-threaded environment for a long time, when simultaneous launch in the background of several applications and services is allowed. So modern devices will not have problems displaying two applications in multi-window mode.
    For those who work closely with hardware, the most interesting thing there is the Vulkan API, but as far as I know, it is also not so resource-demanding. Quite the contrary - it is optimized by working at a lower level and allows you to get more fps with the same hardware performance.

    - It is believed that the interface of previous versions of Android is not very suitable for devices with large screens. Is it possible to say (according to the announced innovations and their implementation in the preview versions) that this problem will be solved in Android N, in particular due to the multi-window mode?

    - In my opinion, the assertion that Android is poorly adapted for large screens is speculative. Indeed, there is a widespread opinion that iPad applications (written for iOS) look prettier and more adapted for tablets than tablet versions of Android applications. But these are the nuances of the applications themselves. This is not due to the screen size, but to the UX when working with the tablet.
    Earlier, perhaps, there were similar difficulties. But back in 2011, when Android 4.0 was introduced and one OS began to work both on tablets and on other devices, developers had the opportunity to create applications for tablets and phones in a single installation file (single apk file). Those. the issue has been resolved. I do not think that the announced innovations will somehow fundamentally change the user experience from working with an Android tablet.

    - Which system innovations, in your opinion, were most expected by the developers?

    - To be honest, I did not notice any wow features on the Android N innovation lists that everyone dreamed about (which could be said: “Wow, we were waiting for this, and they finally did it”) . The existing tools in Android are, by and large, enough, and it’s hard to find fundamental flaws that I would like to fix. But I can note the most major innovations.

    The first point is not even a wow feature, but rather, on the contrary, the next step of “tightening the screws” that Google has been implementing over the past few OS releases. It concerns projects within the OS that deprive the application of resources when working in the background. In principle, this is a very logical step, since Android initially allowed the application to work as it wants and consume as many resources as you like (no matter how long the user has been open). But there are many unscrupulous developers working on the market who actively use system resources, even when their application is in the background. And with each release (both in Android Marshmallow, and now in Android N), Google is showing a tendency to limit system resources, as well as network access, available to long-unused, but running in the background applications.

    The second point is the long-awaited official support for the blacklist of incoming calls. It is most relevant for contact managers application developers or incoming call managers. Everyone knows that earlier, in order to block unwanted incoming calls in Android, it was necessary to do magic with reflection, but this is not the most pleasant solution. Now, finally, the official API has appeared.
    Important innovations that not all journalists talk about, but the developers noticed right away, are changes in security. Android N has an improved certificate record, which will allow you to make more secure applications that are less prone to attack by attackers.
    Another good addition is icu4j support, which allows you to implement various things with application localization (in particular, work with number formatting and other locale-dependent things).

    - And how can you comment on the transition to a new version of Java?

    - This is a twofold moment. On the one hand, the transition to the new version is really needed. This is a natural process, we are glad that support has appeared. But the transition is not so expected. Many developers who have long dreamed of Java 8 chips have already switched to Kotlin from JetBrains, and Google does not mind this approach. Thus, they got the opportunity to fulfill themselves in a beautiful code. In addition, there is a project called retrolambda, which allows you to use lambdas when writing code in Java 7. It does not slow down the compilation process much, but it also speeds up development for those who like to insert lambdas.
    In any case, talking about Java versions is talking about the beauty of the code. If a person thinks about product development, and not about self-realization in clean code, all this is secondary. Therefore, the presence of new chips from Java 8 is, of course, a positive point; Thanks to Google for coming to this. But many Java 8 chips will be supported only in Android N, and we will not be able to put it in the main or minimum version - Java 9, or maybe Java 10 will be released by then. And again, these will be some backports, alternative ways to use features .

    - Are there any innovations that, on the contrary, will complicate the work, with the exception of the above-mentioned “tightening nuts” with resources for applications in the background?

    - Cutting resources is, in fact, the most important. Doze Mode, designed to make applications receive less and less resources, is a key problem, especially for guys who keep some open sockets in the background, try to get user location changes, network status changes, etc. Now they all need to keep in mind that the situation is changing and you need to switch to the built-in google message service and push notifications.
    Another point that developers starting to write under Android N should worry about is the dynamic DPI change. Now the user can change the DPI multiplier on the fly on his device, and the whole layout will suddenly change its shape. Therefore, the developer should make the most rubbery interface during layout and take into account that the user can not only change the device to another, but also change the DPI multiplier on the existing device.

    - Dynamic DPI change - is the “tail” of the multi-window mode?

    - The postulate that developers should make a rubber interface is related to the rubber layout and multi-window mode, but the dynamic DPI change is made more for people with low vision. This will allow them not only to increase the font size, as before, but also to improve the entire interface, make it larger so that it is more convenient to view individual elements on the screen. For example, I would love to buy a new smartphone for my grandfather and reduce the DPI value so that he can see everything on the screen.

    - Only the second Preview version for developers has been released. Is it not too early to start application migration now, especially since the date of the final release of the system has not yet been set?

    - Here it is important to talk about the categories of developers. If you are a pipeline developer who makes an application for an application for the customer, then I don’t see much point now looking in the direction of Android N and trying to explain to the customer that it is already necessary to lay it down. Especially when it comes to one-day applications for 0.1 users.
    If you are a serious product company, and your product already has millions of users, then, of course, what to pull? In any case, you will have to support Android N. So do it in advance, at least in beta versions of your future releases. Build support and see how your applications work, taking into account background restrictions, layout changes, etc. Moreover, if you have millions of users, then at least a small percentage of them will have Android N as soon as the release comes out (or maybe they are already using beta). Why not please them with support for new features and adaptation of their application for this system?

    - Are there any problems in the SDK for Android N?

    - As far as my colleagues and I tried, there are no special problems. You can take new chips and try to use them. However, as far as I know (maybe something has already changed), there is no full support for all the promised Java N features in Java 8.

    - In your opinion, is it now better for developers to immediately target new applications to Android N or look at more common versions of the system?

    - If you start from the most popular version of the OS on the market, then you need to develop Android 5.1 lollipop and not even think about Marshmallow support, because she doesn’t have many users. But this approach is initially not true, because more and more users are updated every day. For example, many flagships from Samsung have been updated on Marshmallow, and this is a huge number of users. Therefore, of course, you need to develop for the latest versions of Android and test on the previous and most popular ones - this will always be a winning approach.




    We invite Khabrovsk citizens to the Mobius 2016 conference on mobile development (St. Petersburg, June 4), at which Denis will make two presentations:

    More information about the conference is on its website .

    Also popular now: