UBooks Reader Update

    image
    So the long-awaited update of the free version of the uBooks reader came out . The reasons for such a long wait have developed into a whole story ...


    Functional


    Although wait, with a story, let's look at the functionality and screenshots:

    uBooks Screen 1uBooks Screen 2

    I will highlight some features of the application:

    • smooth auto scroll
    • paging animation
    • application language
    • custom tap zones
    • book search
    • manual screen rotation
    • bookshelf
    • bookshelf search
    • folders
    • percentage movement in a book


    uBooks Screen 3uBooks Screen 4

    From what you will not notice on the screenshots, I will highlight ways to fill books:
    • using http server
    • using ftp server
    • via web browser
    • public storage


    Instructive story



    And now - the story that began on September 25, 2009, when the censors from the AppStore gave the green light to the birth of the first free version. But, unfortunately, the release of the paid version was postponed by censors for an unlimited period. The motivation for refusing to publish an application in the AppStore was very simple - using private frameworks.

    In order to increase user convenience, a risky decision was made to use the hidden features of the WebKit framework. This is precisely what the Cupertinians did not like. It still remains a mystery how they missed the free version, which is built on the same principle and differs only in the presence of banners.
    We learned a valuable lesson from this - the development of a new version began, in which there would be no shortcomings of the previous version, namely we wanted to get rid of WebKit. The control, which would outline the text, was given the nickname Viewer. And the work began to boil ... The

    viewer was planned to be done in two ways: using OpenGL and our know-how. 2 teams were formed that worked in parallel on these tasks. It was believed that the team that will release the industrial version of the viewer faster and better has won. In this spirit of competition, we worked for some time, and in the end, the team with our know-how came to the finish faster, but it was still far from the end. Ahead was to unite and correct the flaws of the released version, add usefulness that would make it easier to read books.
    One of the main shortcomings, which many complained about, was incorrect recognition of the encoding for TXT files. To solve this problem, an algorithm was implemented that analyzed the frequency of occurrence of characters and suggested the encoding used in the file. And of course, we did not forget about the user - after converting the book to our own format, we left the opportunity to transcode the book.

    To quickly navigate the file, we developed our own format for storing books. The format is xml, in which paragraphs and the number of characters in each of them were numbered for more precise positioning. To quickly move through XML, we decided to abandon the NSXMLParser parser provided by Apple, and use XPath technology to replace it, which allows us to quickly access the required paragraph and draw it.

    A rather difficult task was to optimize the process of rendering text in small fonts when autoscrolling. When reading books there were jerky movements that weary eyes. This was due to the fact that the iPhone-a processor did not have time to draw and process the incoming data in one stream. Having split these two operations into several threads and synchronizing them, we significantly unloaded the processor. This allowed the user to perform additional actions in the background, for example, listen to music while reading.

    By the way, all team members were equipped with iPhona's, on which they tested the application not only at work, but also in real life, i.e. at home, in transport and of course at work. Thus, we were interested in speedy and better development of the application, making usability suggestions. One of them is the built-in web browser, which will allow you, while sitting in a cafe, to surf the Internet and download a new book without resorting to using a laptop or PC.

    The development of uBooks continues, and after the release of the AppStore, we plan to port it to a new and ambitious device - the iPad, expand the functionality, increase the reliability and speed of the application.

    Mini Competition



    The terms of the competition are simple:
    • read the article to this place
    • leave a comment with a feedback that the habro-community will like
    The reward is the promo code for the paid version (only $ 4.99 and no ads).

    Also popular now: