⬆️ ⬇️

Organizational and technical aspects of the distribution of applications for BlackBerry

Organizational part of the process





Research In Motion does not impose any obligations on developers when distributing BlackBerry apps. You can distribute your applications through the BlackBerry App World , or independently.





Work with the BlackBerry App World



To work with the BlackBerry App World you need to have a PayPal account. Previously, during registration, $ 200 was automatically deducted from this account, which covered administrative and other expenses for downloading ten applications. Download a new version of the application is considered as a separate download program. When downloading the eleventh application, the following $ 200 is charged, which covers the next ten applications. And so on. Read more in the BlackBerry App World FAQ .

')

At the time of this writing on the RIM website, there is an announcement that they have temporarily canceled payments when registering and downloading applications.



Receiving earned money is done only through a PayPal account, so in countries with which PayPal does not work in terms of withdrawing funds from the system, it will be necessary to come up with workarounds. For example, registering a Virtual US Bank Account with Payoneer , linking it with a PayPal account and transferring money from PayPal to this account, from which you can withdraw money from an ATM with a Payoneer card.



Under the current agreement, the developer pays RIM 30% of the revenue from the sale of its applications through the BlackBerry App World.



The BlackBerry App World is constantly evolving and offers developers new opportunities to monetize their products. In particular, in the version of AppWorld 2.1 it is planned to introduce support for receiving payments directly from the mobile application.



Work with other sites





Application distribution sites can be divided into two types. The first is free sites like GetJar and Mobango , which provide space on the showcase for your product, with the optional possibility of its paid promotion through advertising, and sites of companies that are promoting applications on their own and with the help of partner distribution channels. For example, Mobihand and PocketGear . It should be noted that in companies engaged in the promotion of your products on their own and with the involvement of partner sales channels, the percentage of the commission that they will withhold from each sale of your product can easily reach 90%.



The technical part of the process





When installing applications for BlackBerry, the file system of the device is not involved. All applications are installed in shared storage, which does not interact with the device file system. This repository is organized as a regular flat list of files. If during installation of a particular application a cod file with this name is already installed, it will be overwritten.



The distributed application can be presented in two forms. The first is a file with the alx extension and one or more cod files of your application. This file set is used to install the application using the BlackBerry Desktop Manager on your BlackBerry device connected to your computer via a USB cable. The second is a jad file and one or more cod files for your application. This kit is used to install the application via the Internet. In the BlackBerry browser, open the jad file located on the server, then confirm the rights that you agree to issue to the application (application permissions) on your device, depending on the functionality implemented in the application, and download it.



In cases when the size of the resulting cod-file is larger than 64 kilobytes (sometimes the border may be slightly moved to the larger side), the compiler creates a composite cod-file. Which is a regular zip archive in a file with cod extension. Such a file can be easily installed via a usb cable, but when installing via the Internet, you should consider the following subtleties associated with the peculiarities of the BlackBerry browser .



A large cod-file after it is signed with an electronic key, you must rename the file with the zip extension and unpack it. Then the zip file can be deleted. The resulting set of files with names like myapp.cod, myapp-1.cod, myapp-2.cod, etc., along with the file myapp.jad should be placed on the web server, writing the following lines to the .htaccess server, if this was not done before :



AddType text / vnd.sun.j2me.app-descriptor jad

AddType application / java-archive jar

AddType application / vnd.rim.cod cod



Specifying the MIME type for jar is done for those cases if you intend to distribute BlackBerry applications as jar files. If you do not plan to do this, then there is no need to specify the MIME type for jar files.



There is no special need to make changes in the jad-file with one small exception. Regardless of the size of the resulting cod-file inside the jad-file, you must add the property “MIDlet-Name” with the name of your application. Otherwise, in the list of installed programs on the device, your application will be listed under the file name (for example, myapp.cod) in which it was installed.



You can automatically decompress a composite cod file and update the jad file using jadtool from BlackBerry Ant Tools



After installing a large application consisting of a set of cod-files, it will again be collected in the device’s memory into one composite cod-file and will be stored in this form.



I must say one more thing. Be careful in naming your application files. That is, if the first version of your application comes in the file myapp.cod, then all subsequent versions of the application, which will be designed to replace this application on the device, should be supplied in a file with the same name.



All applications on the device run inside a single virtual machine. In this connection, it is necessary to observe certain rules when naming packages (pakage) and application classes.



If the full class name (full qualified name) of your application matches the full class name of another application installed on the device and located in another cod file, then neither your application will start with the message “Class com.company.superapp.blablabla .MyClass multiply defined.



In this connection, I recommend naming files by the name of the main application package. For example, com_mycompany_bb_myapplication.cod. It is very unlikely that another application from another developer will be supplied in a file with the same name.



If you decide to change the name of the file of an existing and distributed application for one reason or another, then you need to change the names of the packages within the application to avoid class conflicts between your new application and your same application that was installed earlier.



When creating updates for your programs, always consider the internal structure of the classes whose instances were saved in PersistentStore by previous versions of your application. For example, if you changed the structure of the MyPersistableClass class, whose instance was saved in the PersistentStore by a previous version of your application, then after installing the update, the user will receive an error message. A ClassCastException will occur when trying to load an old instance of the class from the PersistentStore.



“Binding” of an application to a particular device is usually done by a unique number (device pin number), which each BlackBerry device has. When distributing applications through the Try before buy system, this number is used by the seller to generate a license (registration key).

Source: https://habr.com/ru/post/110981/



All Articles