
Almost a year ago, namely on September 12, 2011, we posted on
Google Play, then the Android Market, a client for the Pravo.ru reference and legal system. This project was the first major application from the company Parcsis under the Android OS. Looking ahead, I will say that the development was not at all as smooth as we would like. Not all the ideas proposed by the designers managed to be implemented, and not all engineering solutions met the requirements of the business. Android gave us a lot of surprises.
But, nevertheless, thanks to the team cohesion and dedication, we have gone this way for more than a year, releasing and supporting the product
included in the TOP-10 free applications in the "Business" category.
')

Design
Android vs. iphone
It so happened that in Parcsis, designers are at the head of the workflow. Business analysis is deeply integrated into the design department, and the layout of the application is actually a technical task for the development department. Some time before the development of Andriod, customers for iPhone and iPad were successfully implemented, and the first problem was waiting for us.
Any Android user will surely tell you that Android is not an iPhone at all. But iPhone users think that Android is almost an iPhone, only a little worse. Our designers, as staunch supporters of Apple products, initially proposed to implement the same interface as on the iPhone, ignoring the standard controls and the presence of physical buttons.
It is clear that it was by no means impossible to do that, since then the application would be absolutely unsuitable. As often happens, this problem was solved by a long and detailed conversation, with a demonstration of the interfaces of standard iOS and Android applications. As a result, designers, as people quite educated and possessing the necessary breadth of consciousness, took the position of developers and began to prepare for us a separate layout, different from the iPhone.
Many screen configurations
As I
wrote earlier, Android devices have a large number of different screen configurations, and the number of pixels horizontally and vertically is not a decisive characteristic. After all, there are devices
with a diagonal of 10 inches and a resolution of 800x600 , and
a diagonal of 5 inches and a resolution of 1280x800 .
Designers kept asking what should be the size of the layout page in pixels? It took a real quantum leap of consciousness to understand that a vertex for an android is closer to a web vertex than a layout for iOS.

Development
Offline base
One of the main "chips" of our program is offline mode. The value is obvious - in the absence of the Internet, for example, in the courthouse (or already in jail, as lucky) the user will be able to access all the main documents - the Constitution of the Russian Federation, codes and federal laws. It was originally intended to deliver an archive with documents directly inside the apk file, in the
asserts directory. Arikhv weighed more than 30 meters, which gave the output, along with the resources and the actual binary of the program, apk weighing 35 megabytes. “Okay”, we decided and put the first version on the market.
And almost immediately began to receive letters from users that they can not download the application, even on modern powerful phones with enough free space and fast Wi-Fi.
There were two reasons. First, some android devices
can not install apk files more than 30 megabytes. Secondly, to install an application weighing N meters, it takes about 3N of free space on the phone.
The challenge was to ensure that the application runs on devices with a download cache of at least thirty megabytes.
Various solutions to the problem were proposed. For example, make two versions of the program - full, with off-base, and lightweight, working only online. Or even abandon the pre-formed database, allowing the user to select documents for offline access. But the final solution to the problem was the addition of the functionality of downloading the database from the web, which we still use today. Subsequently, this mechanism was used on both iOS and
WP7 .
Content providers
Android has a great mechanism based on
late binding and
an incredible mix of
AJAX and
DML . It is called
ContentProvider .
This mechanism looks quite native, and we could not resist the temptation to use it. But, as it turned out later, content providers
have a number of significant drawbacks, greatly slowing down the application development process. The only obvious advantage is data exchange with other applications, we have not used, and, in the end, we completely abandoned content providers as an unnecessary layer in the mechanism for obtaining data from the database.

Conclusion
Despite all the difficulties that we faced, we managed to develop a really useful application. His merits were appreciated both by practicing lawyers and law students. The number of devices on which
“Right.ru” for Android is installed is approaching 100,000, every day the program is used up to 15,000 times. We listen to all the wishes of users and read all the letters that send us at
sps@pravo.ru . Each new release adds new functionality to the program, making it even more convenient and useful.