Productive procrastination: development for BlackBerry and Tizen

    I am not a fan of Android. And even more “not a fan” of Java. Therefore, when I faced the task of finishing porting my iOS / Mac / Win8 / WP application to Android, I preferred to do anything to delay this happy moment: I went for an interview in Moscow to the position of iOS developer in Britain (failed), did two cards for my strategic game are out of turn, I watched the film “Frames” (“The Internship” - it’s worth it), I made myself stickers on the MacBook and ... allocated two times two weeks to port the same application to BlackBerry and Tizen.

    Here about these four weeks of my life I will tell under the cut.

    PS. Do not rush to minus, I won’t go anywhere, and I’ll make the application port on Android ... after I port for everything else ...

    I’m risking posting this post not in “I’m PR”, because, let's be honest - you won’t get a lot on BlackBerry in Russia, and Tizen hasn’t come out yet. On other platforms, my application is already promoted to the level I need, and again, Russia is a penny. If anything, please do not ban, but just postpone ... thanks. I will not explicitly name the application, an attentive reader will find it below in the screenshots.

    Everything happened spontaneously. I ended up at the Hackathon as part of MobileFest'13 in St. Petersburg, where I met with the head of the Russian branch of BlackBerry. Talking about my application for iOS / WP / W8 / Mac, I asked if it was possible to get a BB device for development. A minute later, the device was with me.

    Under BlackBerry 10, you can write using HTML5, Adobe Air, repack Android applications and write Native applications in C ++. Well ... I don't own any of these technologies. HTML is not mine; Air is no comment; for Java, see above. So, we choose the “direct” method: C ++. On the pluses, I wrote the last time laboratory work at the institute, in 1998, so I bought a book on Qt (I never opened it, I sell it cheaply).

    There is nothing much to write about registering on the BlackBerry Developer portal. We go and register. To withdraw money, a PayPal account is indicated (I have not received any payments yet, less than a month has passed since my product was in the BlackBerry World store).

    The SDK is downloaded, installed and ready to go. Eclipse-based IDE, but it works very smartly. Simulators in the form of VMWare images - load and work flawlessly.

    The general documentation for BB Native SDK is at a good level, everything is described, although not very detailed, but where to dig is clear. And here is the documentation for the classes themselves at the level: the function returns the result, takes the time parameter, which means you won’t believe it, time ... However, this is not a significant problem either. On StackOverflow there are answers to some questions, to the rest you can find answers or ask them on the developers forum.

    I really liked Qt. The SIGNAL-SLOT model allows you to do without writing delegates and not produce “extra” classes (interfaces, delegates, etc.). I love the "short" code, and I liked the concept of subclass Builder. The builder class returns itself, while it has setter methods for most properties of the object, for example:
    ScaleTransition * transition1 = ScaleTransition :: create (noteView) .fromX (1) .toX (0) .fromY (1) .toY (0) .duration (300) .autoDeleted (true);

    QLM? No QML, only hardcore. I do not like descriptive interface languages, and even more so, with interspersed scripts in a non-native language. In addition, I believe that working with interface objects exclusively from code helps a lot at the initial stage of development to delve deeper into the ideology of the framework (yes, XIB and StoryBoard for iOS are also not my choice ...)

    By itself, the BlackBerry Cascades (GUI framework) is very slim. There are all the necessary components, properties, animations, etc. Even if you take a couple of steps away from the standard interface, there are no problems. Gesture handlers work great, everything is drawn very quickly, resources are read instantly.

    What “features” had to be encountered:
    1) If the control is rotated by some angle, then the tapes are processed not within the control, but within the bounding box (I don’t know how to translate). So you can easily get tap with coordinates [10, -20], for example. I had to process it manually.
    2) It is necessary to set a picture for the pressed state of the graphic button (in my case it is VERY many buttons -> the growing size of the application), so I had to "go out" with a transparent button that, when pressed, had a darkened image on top of the picture itself. Cocoa Touch (iOS), for example, itself darkens the image for the pressed state, if it is not specified.
    3) Something is wrong with Unicode support. So, for example, the characters “☐☒” appear somehow like “aa = a /.” I didn’t figure it out, I made it through the pictures (in my case it’s even a more suitable solution).
    4) There is only one font with four faces in the system ( Normal, Italic, Bold and Bold Italic) and some muddy descriptions that no others can be used, although they seem to be. I put custom fonts to the next versions.

    As planned, on the 11th day of development, the product was ready and sent for verification to the BlackBerry World store. Here you are not Apple. Less than a day, and "our key." What can be noted about the store admin panel: 10 keywords maximum, description in any languages, but the screenshots are only in English (I learned about this when I prepared 8 screenshots in 6 languages).

    If you are writing an application using the Native Framework, then you canBe sure to submit an application to assign the “Built for BlackBerry” badge to the application. Such applications are displayed in the store in a separate group, Built For BlackBerry (in addition to the general dump). “Knowledgeable people” claim that users are more likely to buy native applications. What, in fact, is evidenced by the sales schedule below. At least some sales began on October 12, when they gave me a badge. I want to note that in order to get a badge, you must have a Privacy Policy (not on the product, but on the company profile, which, again, I learned when I made PP on the product in 6 languages).

    What happened on October 27th - I don’t know. But I rejoice.

    From the pleasant: the team of store censors works quickly, answers questions adequately, with a desire to help. They promised to include the product in the monthly worldwide newsletter to BlackBerry customers (so far they have not received something).

    The BB 10 platform itself, as a user, really liked me. Slender, nimble, without a Home button (neither physical nor virtual). I even wanted to buy a BlackBerry Q10 (the one with a physical keyboard), but for now I decided to postpone it.

    Special thanks to the head of the Russian branch of BlackBerry Andrei Kiselev for support at all stages of the work on the program, before and after. When I “bricks” the test phone, the second one was sent to me by courier the next day.

    So, the BlackBerry version is in the store, and Android is still reluctant to take on ... And Tizen comes to the rescue!

    Compared to developing for BB, developing for Tizen is a struggle. But ... a nice fight. The current version of Tizen SDK 2.2 is still very far from perfect, but ... about everything in order.

    Thanks to the representatives of Samsung and Intel on Habr, I went to the Russian division of Samsung, where I was first advised to come to Moscow on October 23 and get a test device there. Fortunately, I managed to convince absolutely adequate and friendly managers that by the 23rd I would already have provided the application, and I needed the device earlier. After 6 days, after completing all paper formalities, the test apparatus turned out to be with me.

    Registration of the developer also makes no sense to describe. The SDK is also downloaded, installed, and ready to go. The IDE is also based on Eclipse, but insanely slow (I have a MacBook i7, 8GB, SSD. Note the BB IDE flies on the same Eclipse). QEMU based emulator. I do not know what these letters mean, I would call it SSEE - Super Slow Emulator Ever (I did not find any ticks about hardware acceleration, or could not turn it on). There is no way without a test device.

    You can write in C ++ or HTML5. I think my choice is clear to you ... After reading HIG and familiarizing yourself with the framework structure, we get to work. And boredom immediately leaves us ...

    The first thing I came across was the lack of an ImageView component. Button is, Label is, Panel is, Slider is, TextArea is ... everything is. But ImageView is not. But we need to write, not cry, so depending on the situation we use our own implementation of ImageView (with AspectRatio and InterpolationQuality) or ... Button in disabled mode with a picture. If anyone needs it, I can share the component.

    Further, JPEG files (with strong compression) are not read correctly, Tizen confirms the bug and advises temporarily using the method with an explicit format indication. By that time, I really realized that I didn’t need him at all ...
    Tizen :: App :: Application :: GetInstance () -> GetAppResource () ->
    GetBitmapN (resourceName, BITMAP_PIXEL_FORMAT_ARGB8888).

    The Label component forgot to make properties for setting the right margin, and it is of the order of 20 px, with which nothing can be done. And at EditArea, not only the right margin was forgotten, but the setting of the left margin does not work for values ​​less than 20 px. We have to solve the layout. I am already silent that I forgot to EditArea to make the FontStyle property (Normal, Bold, Italic) ... you can’t get around this.

    It’s also not clear how to set the Native application to work only in portrait mode “human”, it is necessary to register the forms and frame as Tizen :: Ui :: IOrientationEventListener wherever possible, and conjure it already.

    Gesture handlers work disgustingly. For example, the PinchGestureRecognizer behaves perfectly if two fingers are oriented SW-NE (south-west - north-east), but the component mercilessly sausages, if vice versa. I didn’t succeed in mixing handlers with low-level tap handlers. As a result, all processing is only on tapas (as in the good old days before iOS 3.2).

    And where is the rotation of the controls? But he is not. There is neither .transform as in iOS, nor .RotationZ as in BlackBerry, nor .RenderTransform as in Win8. But there is RotationAnimation! But there it was ... the final angle for Rotation Animation can only be 0 degrees ... Valuable. But here you can cheat. If you set the initial angle of rotation you want, the final angle is 0, and the duration is 2147483647 (approximately 21 days), you can achieve the desired result (and twitch the timer periodically).
    GetControlAnimator () -> StopAllAnimations (); 
    GetControlAnimator () -> StartUserAnimation (ANIMATION_TARGET_ROTATION, 
    RotateAnimation (_note-> GetAngle (), 0, 2147483647, ANIMATION_INTERPOLATOR_DISCRETE));

    Very pleased with the presence of Scene Manager (workflow). This is something like iOS StoryBoard, but much simpler. In the form of a diagram, forms and parameters of transition animations are set, then a form factory and a panel factory (if applicable) are written (filled), and all transitions between scenes are carried out literally in 1 line of code. I agree to that.

    Tizen Store is available only for receiving applications, the procedure also does not deserve attention. We make a package, write a description, post screenshots, an icon and ... in a day we get approve. One thing really upset me - this is the requirement to have a round icon. This ... this ... well, somehow not at all human. I drew a great icon from three circles, but I was assured that it would not work.

    To publish paid applications, you must submit an additional application (while this is not relevant at all), but I went through this procedure in one day. You can bind PayPal, or you can bank account (USD). I went to the bank, took a beautiful piece of paper about the presence of an account, and together with a copy of my passport I uploaded it to the form on the website. Let it be in advance.

    For the sake of what else I got into Tizen - this is participation in the Tizen App Challenge ( with a prize fund of $ 4,040,000. It’s possible that it will change (accepting applications until November 1). And, perhaps, I have high hopes that the application, which will be in the store on the day of its opening, has a greater chance of success (this was the case with the iOS version, which was ready for the first iPad).

    Oddly enough, of all the 6 platforms to which I ported my application, perhaps the most interesting was Tizen. In terms of new sensations, some, I don’t know ... freshness? SDK will be finished and will be brought to a more harmonious look. I have no regrets about the spent 12 days.

    Tizen OS itself on the test device is not very impressive. No, she’s all right, but some of her is not finished. Although, it is unfinished. The official release is expected early next year, and, as I heard, the interface is left at the end of development.

    I express my gratitude to the representatives of Samsung and Intel: Ekaterina Filenko, Renat Nyazhemetdinov, Kirill Chuvilin and Kirill Danilov for their help in developing, receiving devices, for an excellent master class in Moscow on October 23 and in general for a positive attitude and participation.

    And here is the result of a month of work:

    Now it's time for Android ... though ... maybe FireFox OS? How are they doing there?

    I will immediately answer the questions (which were asked on previous posts about this application):
    1) Yes, indeed 12 calendar days for everything. And I don’t have to talk about two weeks on architecture, a month on development, a month on QA and a week of pre-production. This is the lot of "corporations."
    2) No, this is not a waste of time. This is a good experience, new acquaintances and, in general, over the next couple of years of sales - a tidy amount of income (over two weeks of work).
    3) With BlackBerry I am now getting more than with Win8 + WP for the same application (but this is rather a minus to the MS garden). And I live due to iOS.
    4) I do not know who and why is buying my application. But someone and for some reason buys. And that’s great.

    I am ready to answer any questions as I can - I will help.

    BlackBerry Developer portal:
    Tizen Developer portal:
    BlackBerry World:

    Thank you.

    Also popular now: