2015 Results for Android Developers

    2015 is over, which means that it is time to take stock. What important, useful and interesting for Android developers happened last year - read our blog.




    The year turned out to be quite eventful not only for ordinary users who received a large line of new devices, the new OS version - Android Marshmallow and many changes in the design of most popular applications (Material Design continues the onset), but also for Android developers who felt no less significant changes in the working environment, libraries, and design patterns.

    A library has been finally released for almostfull support for Material Design guidelines - Design Support Library. The developers received new components for implementing FAB, Navigation Drawer, SnackBar, Collapsing Toolbar and other elements. At first, there were a large number of bugs, but at the moment the library has already been finalized for widespread use. Support libraries have also been updated and added, a full list of which you can find here .

    Android Marshmallow


    The new version of the Android operating system brought not only new approaches to the design of the interface, but also made a significant correction to energy saving and access rights for applications. The developers were introduced a new version of the SDK (API 23), which along with the innovations brought a lot of problems:
    • Real-time permissions. Now, for potential “dangerous” actions, developers will have to ask the user for permission right while the application is running. More details can be found here . The latest versions of support libraries provide a fairly convenient interface for working with permissions, but this solves only a small part of the problems related to the implementation of obtaining rights, but not to the logic of the application. For example, disputes about what to do if the user has not granted some permission still persist.
    • DOZE Mode. The Google team has taken a very important step towards optimizing battery performance, which previously caused a lot of criticism. Users, not seeing the history of battery consumption, directly blamed the OS, not realizing that more often questionable applications from no less dubious authors eat up the battery. Now users do not need to worry about this. With the advent of two new modes - Doze Mode and App Standby - the operating system shuts off oxygen to all excessively gluttonous applications. Doze Mode is a mode in which absolutely all devices running Android Marshmallow OS go after a certain time of inactivity and without charging. And the second new mode is App Standby - automatic deprivation of access to device resources of all applications that have not been used for a long time. It is important for developers to take into account changes in the work of the JobSheduler and SyncAdapter classes: when switching to new modes, all current tasks are canceled, and new ones are postponed until awakening. More information here or here . Interesting transition schedule in doze mode.
    • Apache For some, but not for some, the news about the inaccessibility of Apache packages in API 23 was good. If you used it in your applications before, now you will either have to refuse it or connect it separately.
    • System security using the system itself. Unlocking the screen, working with the sensor for third-party applications, regardless of the smartphone model, purchasing from the Google Play store and authorizing sites using a fingerprint - all this has become a reality in the Android world. More details .


    Google play services


    With the new service update to version 8.4, the developers have expanded the possibilities for using the previous modules:
    • Google Maps - an opportunity to work offline. In addition, the implementation of cards on Wear devices has become available.
    • GCM . Please note that the module for push notifications has been redesigned and, if you used WakefulBroadcastReceiver earlier, it is recommended to switch to the new architecture, details here .

    A number of new modules have also been added to Google Play Services:
    • Google Fit API - There is a whole industry of fitness applications that use various device sensors to collect data. Now it has become easier with the new module for working with sensors.
    • Places API - now access to Google Addresses has also appeared (previously access was possible only through the web API). However, note that Google has still not implemented support for laying directions on Google maps (Directions API).
    • You can find other modules such as Google Drive, Mobile Vision API, Marshmallow Permissions, Application Measurement, Nearby Messaging and many others here .


    Libraries and frameworks


    Retrofit 2
    Very important was the update of the most popular network library - Retrofit - to version 2.0. So far, this version is in beta status, but this does not prevent developers from actively using it. Of the main changes: encapsulating the request in the Call object (allows you to organize more flexible work, including canceling the request), dividing the library into components, supporting various converters and adapters, and syntactic sugar in the form of new annotations. In more detail - performance of Jake Warthon on Droidcon.

    RxJava
    This year was also marked by a tremendous increase in the popularity of the RxJava framework on Android. This library works closely with Retrofit and other libraries such as Realm. RxJava has many advantages for executing queries with the ability to combine, restart, and much more, which makes it convenient to use it for working with a network, among other things. Today, a lot of resources are devoted to this framework: blogs , habr and much more. Also, many developers diligently rewrite standard functionality in a reactive style: RxBinding , RxPermissions , RxLoader .

    Dagger 2
    Also, Dagger 2 was noted as growing in popularity. Here it is worth mentioning its main differences with Dagger 1:
    • Lack of reflection, which increased the readability of the source code and increased productivity.
    • API for working with POJO.
    • Validation of graphs at compilation stage.

    Documentation and example Dagger 2 + MVP bundle .

    Kotlin The
    promised release of this language almost took place, the current version is 1.0 Beta 4. Of course, sometimes problems can arise, including many complaints about compilation, but JetBrains is actively working on this. And in general, Kotlin is already quite ready for use in combat projects. More details here and here .

    Established practices


    If the previous year became some standardization in terms of interface design, then the current year was filled with attempts to standardize the "internals" of the application - that is, to provide such patterns with which it would be possible to develop applications in a fairly universal way. It used to be difficult to talk about some common architecture of Android applications, but now most companies are already diligently implementing practices and approaches for using well-established development patterns.

    MVP
    This is both the most popular and the most controversial pattern. Popular - because it successfully allows you to separate the business logic and interface elements, which in turn provides convenience during testing. Controversial - because absolutely every developer has his own opinion on how to implement this pattern. You can look at some of its implementations here . There is also a good article on the hub, which talks about the combination of MVP and RxJava.

    MVVM
    Another trendy pattern that is actively used in WPF. He gained popularity in the Android world thanks to the development of Google - Data Binding. It should be noted that this library is still not stable enough (it has beta status). However, Google will undoubtedly bring it to mind, so it’s worth studying now .

    Android Studio 2.0


    The end of the year was marked by another significant event for developers - in November Android Studio 2.0 became available to everyone in the Preview Channel. Obviously, the functionality presented makes this update the most significant of all:
    • Instant run. What many developers have been waiting for so long. Now you do not need to deploy the application again every time after several lines of changes. So far, it does not work very stable and only when using Gradle 2.0 alpha (which is also not very stable). We will wait for Google to stabilize, which we all will be incredibly happy.
    • New emulator. Every developer knows about the speed of the native emulator, and it is not surprising that most prefer Genymotion. Surely Google did not like this situation, and now in Android Studio we see an excellent emulator, with all the necessary functionality: with a camera, GPS and blackjack .
    • Also, the Google team paid enough attention to the build time of projects . According to them, in the new version, projects are assembled twice as fast. Naturally, this cannot but rejoice.

    You can find more detailed information in the blog of developers.

    Conferences


    In 2015, there were also many worthy conferences, such as Google I / O and many Droidcons (of which Droidcon NYC stands out most of all).

    Google I / O 2015
    During Google I / O 2015, the speakers focused on new versions of Google’s operating systems and services, so the main topics of the conference were: Android M, updated Android Wear, Internet of Things, Google Now, Google Photos, offline -services, new tools for developers, updated Google Cardboard. An overview can be found on the GT .

    Most of the news we have already reviewed separately, but something worth mentioning:
    • Web experience. The main update here is Custom Chrome Tabs . The problem that this tool solves is the following: more and more applications for Android use browser functions one way or another, and often when using one or another program you have to constantly switch between it and the browser window with the application open tab.
    • Mobile payments. Finally, Google introduced its version of the payment system from a smartphone - Android Pay. A bank card is attached to a smartphone with an NFC chip, and users can pay with the device in those places where Android Pay is accepted for payment.
    • Google Maps and YouTube offline. Now in Google Maps in the absence of an Internet connection, you can not only view the map of the area that you preloaded, but also use the search, see the POI and even use navigation with voice prompts. This is really what Google Maps users have been waiting for a very long time. More details .


    Droidcon NYC
    This conference was marked by a large number of reports devoted specifically to development, and it is not surprising that it enjoys well-deserved popularity. It’s enough to even watch the program to stay there for a long time. Of course, you need to highlight the reports Simple HTTP with Retrofit 2 , Detect all memory leaks with LeakCanary , Fresco: How Facebook saved a century a day , Kotlin: New Hope in a Java 6 Wasteland, and many others.

    Android Dev Summit
    At this conference, we saw many interesting reports on the most pressing topics, of which the following can be highlighted:


    What awaits us in 2016


    Undoubtedly, more and more projects will be developed in a reactive style using RxJava. Also, many companies and developers will try to adhere to such patterns as MVP and MVVM, due to which, moreover, the growth of test coverage is expected, as this will become more accessible and less costly (especially considering the latest testing frameworks).
    Potentially new solutions for working with databases should be expected, since existing libraries still have many shortcomings.
    We also hope to get closer to the dream of minSdkVersion 19 (and maybe 21).
    And of course, every year the development for Android is becoming more and more interesting, so we will believe that 2016 will bring all of us even greater new ideas and solutions.

    Acknowledgments


    First of all, I would like to thank all the active participants in the new community of Android developers who helped in writing this article. Some would like to thank separately: atetc iamtodor nexus700120

    Also popular now: