Developers Club geek daily blog

Use of the MVVM (Model-View-ViewModel) template in Android

1 year, 11 months ago


Author: Anton Valyukh, Senior Mobile Developer.

In this article we will talk about the theory and practice of use of very convenient template of design of MVVM (Model-View-ViewModel) when developing Android-applications.

MVP — Model-View-Presenter

For a start — there is a little theory. Everything began with the fact that many thought how to adapt the MVC (Model-View-Controller) template for an applications writing with a user interface. And in 2006 in work of "GUI Architectures" of Martine Fowler in detail considered a template which received afterwards the name "MVP" ("Model-View-Presenter").

So, MVP — the design template derivative of MVC developed generally for creation of the user interface. MVP is used for simplification of automatic modular testing and improvement of separation of logic and display.

In this template there are three elements:
  1. View.
  2. Presenter.
  3. Model (model).

Read more »


Record and processing of video on Android

1 year, 11 months ago


Applications writing for Android connected with record and processing of video — quite complex challenge. Use of standard means, such as MediaRecorder, does not represent special complexity, but if to try to do something beyond normal — true "fun" begins.

Read more »


GDG Devfest Krasnoyarsk and Kaliningrad this Saturday

1 year, 11 months ago
Hi, Habr! The wave of Devfest'ov continues to overflow everything the new and new cities of Russia. On these days off beacons of knowledge of guglotekhnologiya will be lit in two: Kaliningrad and Krasnoyarsk. We invite all fans of IT and Google of technologies to meet and discuss topical issues. What will be discussed at conferences where they pass and by which o'clock to come — under a cat.

image

Read more »


The digest of interesting materials for the mobile #132 developer (on November-6 30 December)

1 year, 11 months ago
This week the main news – the publication of Apple of the source code Swift. Besides Google called the best games and applications of 2015, Perk purchased Corona Labs, "Yandex" made the keyboard for iOS, and the State Duma suggested to enter the VAT for purchases in app stores. All this and many other things in the new digest!

Read more »


Mobile search in applications … which you do not have!

1 year, 11 months ago
In far 1998 when Google only began the way the search Internet, net search in itself meant a table, a chair, the computer (Pentium 2 at best), dialup-connection. You reflected twice whether it is worth clicking on this link or not to spend time and to read search issue further, in hope to find necessary from the first?

Today the lion share of search queries is sent from mobile devices, and mobile phones acquired a high tech, the high-speed Internet and applications in which information interesting you, even in those applications about which you also did not hear can … be also possible.



Information search in third-party applications still remains a complex challenge therefore we want to provide you system which will find answers not only in a network, but also in applications. And even in those which you did not download and did not put.

Read more »


I trust – I do not believe in indi-development. Part 1

1 year, 11 months ago
Probably, in work of each programmer there comes the critical moment when creative favourite work develops into routine. All cope with this moment on the. Someone changes a programming language, someone changes work, and someone tries to make an independent product.

image

This moment did not pass by me, and filled with all the entity and ordered to do something. Work did not want to be changed, and here it was possible to create something out of this work. As at work it is necessary to be engaged in creation of exclusively useful applications – there was a wish to make something absolutely useless other. In my understanding it had to be the entertaining application, so game. At worst game has to go to a moneybox of a portfolio which is not prohibited by agreements on nondisclosure of a trade secret (yes, you work hard, and you can show nothing as it is impossible). In the best case that game pleased – it has to bring though some money.

Read more »


GDG DevFest Nizhny Novgorod 2015: the photoreport from action

1 year, 11 months ago
Hi, Habr! Here also time to tell about the first in the history of GDG DevFest'e in Nizhny Novgorod on which local admirers of technologies of Google had an opportunity personally to meet and discuss actual technologies came. Conference was visited by more than hundred participants, and not only the Nizhny Novgorod specialists, but also guests from other cities acted as experts.



We together with young community GDG in Nizhny Novgorod hope that all visitors of DevFest'a were satisfied with results.

Read more »


We write tactical game about digits under Android

1 year, 11 months ago
When I only undertook programming (3 months ago), I quickly understood that it is better at once to begin to be engaged in the projects. It is impossible to be all day long at books or courses, but if you begin to do something special, then easily stay behind development from morning to the morning.

This article — the small tutorial how to make logical game with a bot. Game will look here so:


* I will in detail describe rules once again in the section about AI.

Conditionally I separate readers of article into three groups.
  1. Began to program a few hours ago.
    To you it will be difficult, better previously complete some small course on introduction to Android-development, deal with two-dimensional arrays and interfaces. And then load the project from a gitkhab. Comments and this article will help you to understand as as works.
  2. Already you are able to program, but you cannot call yourself experienced yet.
    It will be interesting to you because you very quickly will be able to make the game. I undertook a dirty job on creation of logic of game and an ui-component, I leave you creative part. You can make other mode of game (2 on 2, online, etc.), to change algorithms of a bot, to create levels, etc.
  3. Experienced.
    To you can be interesting to think over AI — to write it not so easily as it seems at first sight. Also I would be very glad to receive from you notes on a code — is sure, I made not all optimum.

Read more »


Implementation of the application – device owner-а under Android

1 year, 11 months ago
This article represents the instruction for writing and installation on the target device of the application – device owner-а. Me the fact that when I began to study this question, it turned out that there is no good official documentation with examples induced to write this article, and information had to be collected by means of Google.

In Android OS, starting with version 5.0 Lollipop (API 21) there was a remarkable opportunity to manage the device programmatically, being in the device owner mode. For example, it became possible to make "silent" installation / removal of applications, "to hide" the applications (and they disappear qualitatively, i.e. disappear from the list of applications in settings, disappear from a launcher and the list of the last used applications) and to do many other things. These are very useful opportunities for implementation of MDM. The overview of all opportunities which are given to device owner-at are beyond article, about them it is possible to esteem here and here.

Read more »


Pagination of lists in Android with RxJava. Part II

1 year, 11 months ago
All good afternoon!
Approximately a month ago I wrote article about the organization of a pagination of lists (RecyclerView) by means of RxJava. What there is a pagination simply? It is an automatic podgruzka of data to the list at its scrolling.
The solution which I presented in that article was quite working, steady against errors in replies to the requests on a podgruzka of data and steady against reorientation of the screen (correct saving of a status).
But thanks to comments habrovchan, to their notes and sentences, I understood that the solution has a number of shortcomings which quite on forces to eliminate.
Many thanks to Matvei Malkov for detailed comments and excellent ideas. Without it refactoring of last solution would not take place.
I ask all become interested under kat.

Read more »