There are already quite detailed articles on Habré that are devoted to Bada, for example, this and this one, but there is no step-by-step description of creating an application for beginners. To whom it is interesting - I ask under kat.
The topic for writing arose by chance - a friend is actively engaged in establishing the boundaries of land using GPS in a geodetic company; the specifics of the work (where did it come from - good question) is that the received geodetic coordinates (let me explain what latitude and longitude are meant) must be converted into rectangular ones right after they are received. The company does not have laptops capable of withstanding an 8-hour working day and is not planning to, but a friend recently bought a smartphone from Samsung actively promoted in Ukraine with operating system Bada, Then the question followed - if you can download games for your phone, is there an application that can solve the described purely engineering problem? Such an application, of course, was not found, and I received a kind offer to write one for a certain fee.
Tools
To develop applications for Bada, the Bada SDK 1.2.0 is used, which can be downloaded by registering on the Bada developer site. There is nothing complicated in this process, but at the stage of choosing files for downloading, I, frankly, “blunted” by downloading only the SDK, and the so-called language pack(language pack) no, hoping that, as written on the site, its download will happen after installing the SDK automatically. However, at the installation stage, something went wrong, the installation continued without downloading the language pack, which subsequently led to the inability to build (build), let alone run the application.After downloading the SDK and the language pack, they should be put in one place, and when SDK installation or if it is modified, the installer will pick up the language pack and install it on its own.
The actual creation of the application
The development environment is based on Eclipse, the C++ programming language used. Let's start by moving on to creating a new application with the obvious command File -> New -> bada Application Project. In the window that appears, define the name of the project in the Project name field, select the application type in the Project Type list - bada Form Based Application.
Next, the environment will ask you to determine the technical parameters of the device for which the application will be intended (screen resolution, GPS, etc.). These settings are defined in a special manifest file, Manifest.xml, which can be selected from the SDK files, created and downloaded from the Bada Developers site, or you can create your own. Without further ado, I used the manifest file from the Samples folders that are installed with the SDK, since my application did not require any "bells and whistles", but only the screen resolution was important.
Next, the environment will ask you to specify the root directory of the SDK, this should not be a problem. After selection, the name of the device model and its API will appear in the list, which will be used in the future for programming.
The next step is to determine the name of the default form that will appear immediately after the application starts. *.h and *.cpp files will be generated by this name.
Next, you need to determine whether or not to add auto-scaling support and the best screen resolution, if this feature is added. I understand that it is better to do this, since the application will be able to run on different devices with a different resolution and it does not have to be redone.
The next link in a long chain of settings is the definition of an Application ID, to authenticate the application's functions if it needs to read and write to protected folders. I didn't need it, so I omitted this step.
Nearly finished - defining the obvious Name, Vendor, and Description application properties.
And now it’s almost almost the end - this is the definition of the necessary configurations for development: I recommend leaving everything by default, and now the most important configuration is Simulator-Debug - this is the ability to debug code on a device simulator, Target-Release - configuration for compiling the application before uploading it to real device.
The last step is the summary of all the settings in the Summary window, which you can read again and make sure that everything is selected correctly.
After the final settings, the future application appears in the Project Explorer, clicking on which leads to the disclosure of resource files in the Resources window and the appearance of the following window:
After clicking on the form (and in general on any control) on the Properties tab, you can change the obvious properties of the application, such as text in the title, background color, presence and name of soft keys.
I immediately moved the ready-made button, which the environment kindly generated, lower and wrote Calculate on it. Having a GUI Editor, it is easy to get the following interface, which is well suited for my task (I believe that the process of transferring controls to a form and setting their properties does not cause any difficulties); as labels for input fields, the obvious Label is used, as input fields - EditField; Labels are also used to display the result of calculations, since their editing is not provided:
Now the coding itself.
The running application goes through several stages (the Help is very detailed, you can find details there), now we are primarily interested in the application initialization stage, which is responsible for the OnInitializing (void) method of the form class, which can be found in the file<ВАША_ФОРМА>.cpp in the project's src folder.
By default, this method looks like this:
Result Form1::OnInitializing(void) ( result r = E_SUCCESS; // TODO: Add your initialization code here // Get a button via resource ID __pButtonOk = static_cast
I did it like this:
protected: static const int ID_BUTTON_OK = 101; // new action ID for button CLEAR static const int ID_BUTTON_CLEAR=102; // geodetic constants static const int a=6378137; static const float alfa=1/298.257223563; Osp::Ui::Controls::Button *__pButtonOk; // new field: button Osp::Ui::Controls::Button *__pButtonClear; // new fields: edits and labels Osp::Ui::Controls::EditField *__pB_deg; Osp::Ui::Controls::EditField *__pB_min; Osp::Ui::Controls::EditField *__pB_sec; Osp::Ui::Controls::EditField *__pL_deg; Osp::Ui::Controls::EditField *__pL_min; Osp::Ui::Controls::EditField *__pL_sec; Osp::Ui::Controls::EditField *__pH; Osp::Ui::Controls::Label *__pX; Osp::Ui::Controls::Label *__pY;
Now, in the OnInitializing(void) method, you can create a Clear button and assign an Id Action and an Event Listener to it. We will do the same with EditField and Label, without adding Id Action and Event Listener to them, since their reaction to user actions in our simple application is not provided (IDC_BUTTON1, IDC_EDITFIELD1, etc. - the Name property values for the button).
PButtonOk = static_cast
At this stage, you can already run the application and see how data is entered into the simulator, but of course there is no benefit until the button press events are processed.
To solve this problem, the form class method OnActionPerformed(const Osp::Ui::Control& source, int actionId) is used. As you can see, the second parameter is the Action Id already mentioned above. When the application is executed, button click events are “listened” and the Action Id assigned to them is passed to OnActionPerformed(const Osp::Ui::Control& source, int actionId). If processing is provided here for such an identifier, it is performed.
OnActionPerformed has a switch blank for parsing the actionId parameter, it is convenient to use it. Next, I will allow myself to give the code of this method with detailed comments:
Void Form1::OnActionPerformed(const Osp::Ui::Control& source, int actionId) ( const int MAX_BUFF_SIZE = 512; switch(actionId) ( case ID_BUTTON_OK: // button press response Calculate ( // get a string representation of degrees, minutes and seconds of latitude and... String B_deg_str(__pB_deg->GetText()); String B_min_str(__pB_min->GetText()); String B_sec_str(__pB_sec->GetText()); //...longitude String L_deg_str(__pL_deg ->GetText()); String L_min_str(__pL_min->GetText()); String L_sec_str(__pL_sec->GetText()); // ... height String H_str(__pH->GetText()); double B_deg,B_min ,B_sec; double L_deg,L_min,L_sec; double H; // conversion of string representations of numbers into real form for calculations result r1=Double::Parse(B_deg_str,B_deg); result r2=Double::Parse(B_min_str,B_min); result r3=Double::Parse(B_sec_str,B_sec); result r4=Double::Parse(L_deg_str,L_deg); result r5=Double::Parse(L_min_str,L_min); ); result r7=Double::Pars e(H_str,H); // calculations double b_in_decimal=B_deg+B_min/60+B_sec/3600; double l_in_decimal=L_deg+L_min/60+L_sec/3600; double eSqr=2*alfa-(alfa*alfa); double N=a/Math::Sqrt(1-eSqr*(Math::Sin(b_in_decimal))*(Math::Sin(b_in_decimal))); double X=(N+H)*Math::Cos(b_in_decimal)*Math::Cos(l_in_decimal); double Y=(N+H)*Math::Cos(b_in_decimal)*Math::Sin(l_in_decimal); StringstrX; StringstrY; // transformation numerical values coordinates to string representation strX.Format(MAX_BUFF_SIZE,L"%f",X); strY.Format(MAX_BUFF_SIZE,L"%f",Y); // displaying the received numbers in the Label __pX->SetText(L"X="+strX);__pY->SetText(L"Y="+strY); __pX->Draw();__pY->Draw(); __pX->Show();__pY->Show(); ) break; case ID_BUTTON_CLEAR: ( // reaction to pressing the Clear button // create a dialog box with OK and CANCEL buttons and a question - clear all fields? MessageBox *pMessageBox = new MessageBox(); pMessageBox->Construct(L"MessageBox", L"Clear all fields?" , MSGBOX_STYLE_OKCANCEL ,9000); int ModalResult; pMessageBox->ShowAndWait(ModalResult); // if the answer is yes, then... if (ModalResult==MSGBOX_RESULT_OK) ( // ... clear input fields and Label __pB_deg->Clear(); __pB_min->Clear(); __pB_sec->Clear(); __pL_deg->Clear(); __pL_min->Clear(); __pL_sec->Clear(); __pH->Clear(); __pX ->SetText(L"X=");__pY->SetText(L"Y="); ) // delete MessageBox delete pMessageBox; ) break; default: break; ) )
Appearance simulator with running program as follows:
Same with MessageBox:
That, it seems, is all. I would like to note that the application does not pretend at all to the breadth of coverage and the correctness of all formulations, for example, there is no “fool protection” at all, since I hope for the sanity of my friend and four of his colleagues for whom this program is intended.
More recently, another application for the development of Bada has been received - it is necessary to search and display on the map the nearest objects, such as ATMs or account replenishment terminals. If this topic is of interest to anyone, I will gladly share my experience.
If anyone has a question about what, in fact, to do next with the program, then this is covered in detail in the articles on the Bada Developer website, I will not touch on this, since programming is still a more complicated topic.
Application sources are available
In general, I'm certainly not a supporter of such things. I think developers should get paid for their work. However, I am convinced that an adult, solvent person will buy a game or program if he likes it. Unfortunately, not everything can be tried without buying, and therefore, in this perspective, installing paid software for review looks quite acceptable. In any case, there is a way and it works. Also considering that, and the further fate of the owners of badafons is generally incomprehensible, in the end I don’t consider it shameful to use the developments.
So, as always, I warn you - the way is working. I tested it myself. But in any case, if you disrupt the performance of your device, these are only your problems. Do everything according to the instructions and everything will work like a clock. Deal.
Let's get started.
I tested this method on Samsung S8500 Wave and official Ukrainian firmware. You can download it from .
We don't need much.
1. Multiloader - take it by . Any version, but I would take the latest.
2. File apps_Compressed_spoof_Wave_I.bin - download it from the link (this is for the first wave, for Ukraine)
We put Angry Birds.
First of all, we flash the apps_Compressed_spoof_Wave_ file for ourselves (depending on which wave you have). This is done once. To do this, launch Multiloader and select LSI, Boot Change and Full Download. Screenshot is clickable:
We add our file. You can simply drag it into the program window. We cut out the phone. We simultaneously hold down the volume key down + lock + turn on (red pipe). DownLoad Mode will light up. Then Port Search. Then Download. If you have ever sewed your phone, this is not news to you.
The file is zipped - good.
After unpacking Bada Wave Spoof (program in the archive). We find such a file inside: BadaCertificate.cer. We copy it to the phone (it doesn’t matter where, but it’s better to the Others folder). We go in the phone to the folder where we copied and tap on the file. Agree with the warning and install the certificate.
Unpack the archive with the game or application, in our case, the AngryBirds.rar archive and specify the path to the folder and, in particular, to the file with the name of the application.exe game (in our case, AngryBirds.exe).
Most likely the file will be in the Bin folder. Check the box as shown in the screenshot. Alternately press the 1. Sign button first, and then the 2. Rename button.
Alternately, first press the button 1. Sign
Everybody is here. Go to the Copy tab. We cut the phone in Removable Disk mode and select a memory card in the drop-down list. If not, click the button with two green arrows next to it. We are waiting for it to load.
After successful copy. We cut off the phone and go in the phone along the path Settings - General - Installation location - select the memory card. We cut the phone in Samsung mode Kies.
I recently managed to become the owner of a "smartphone" Samsung Wave 525 with the Bada operating system. In principle, I needed only two functions from the phone - music player, into which you can plug ordinary headphones with a 3.5-inch minijack, and access the Internet via Wi-Fi. The brand new Wave 525 can do all this with varying degrees of success. “But,” I thought, “since he has the audacity to call himself a smartphone, you need to load it to the fullest.” And started loading.
All "native" applications on a phone with the Bada system are installed through the Samsung Apps store. You can connect to it either through the app of the same name on your phone, or by connecting to a computer using a desktop program Samsung Kies. Insofar as home wifi I have not got it yet, I chose the second option.
When connecting the phone to the computer, Kies immediately offered to update the firmware. It should be noted here that in my memory the memories of updating the firmware with a proprietary program on my previous phone are still alive - Sony Ericsson k800i. The update program was downloaded from the official Russian site, the firmware update procedure was successful. After that, I found myself in my hands with a wonderful English-language phone without any signs of the Russian language. After that, I wrote to technical support several times - each time the robot sent me back two letters stating that they opened a ticket for my problem and will solve it over time. This happy time so it never happened.
But enough digressions. Discarding my sad experience, I still pressed the "Update Firmware" button. And... nothing happened. The phone turned off, then connected again and the window with the offer to update the firmware popped up again. Technology works wonders.
In the app store, I looked at the prices and calmed down a bit. I was scared that the prices in the Ukrainian branch of Samsung Apps were somehow prohibitively insane. This is not entirely true - basically, the prices for paid applications range from 10 to 50 hryvnias, and there is also a lot of free software. Although, as it turned out later, the quantity here did not begin to turn into quality.
Immediately struck by the almost complete absence of localized applications. Moreover, not only on the familiar and relatively understandable English language, but also in completely unreadable Arabic, Chinese (Japanese? Korean? go figure out these hieroglyphs ...). I was especially surprised by the incredible abundance of applications with the postscript "Vietnamese only" (only in Vietnamese). And this is in the Ukrainian section of the store! Was someone too lazy to set the distribution regions?
Thanks to such a "careful" selection of applications, the entire store resembles a dump of substandard software. I still found the strength to delve into it and shoveled almost everything in a couple of days free apps. After that, three kinds of pianos of varying degrees of wretchedness appeared on my smartphone, several slow toys, one slow but cute note-taking program, a Pipeline Dropbox client, a program with sounds for relaxation, and a simple program called Vibrator (guess what it does). ). Everything. Extremely useful software, no doubt. To read books, I had to install the Foliant java application (an excellent program, by the way). There was no normal media player to replace the poor audio and video player of the phone, even in paid applications.
I was amused by the presence of a paid client for Vkontakte from GlobalLogic inc - "ЄKontakt". On the screenshots, the program looks quite decent and even pretty. At least, this is almost the only application that is similar in design to the interface of the phone itself and seems "native" - and this cannot be said even about some of the applications that were included in the package. But I did not buy this application, because I never figured out why I would need it.
Such are the impressions. The people in these your internets say that Bada is a very young OS, that's why the whole mess. Let's see, maybe normal applications will appear over time, the store will be put in order. So far, it's bad.
» Whatsapp for bada
If you are the owner Samsung smartphone running the Bada operating system, you will not be able to install Whatsapp with one click of a button. To install, you need to download Whatsapp for Bada for free and then install it.
Watsap for Bud is a special installation file adapted for this operating system. This is an unofficial version of the messenger, but it works stably and provides the opportunity to enjoy all the benefits of WhatsApp. Manufacturers of smartphones with this OS remained deaf to the requests of users to port this application to the Bada platform.
Bada is an operating system for Samsung Wave series models, which is a modified Android OS. Since this is not quite Android, you will not find WhatsApp in the app stores for Bud either. But thanks to caring programmers, we can download the adapted WhatsApp file for Bada and install the Russian version.
Installation process
1. Download the WhatsApp file with the .apk extension. You can download it to your computer, and then transfer it to your phone, or immediately download it from your phone. The file is quite large (about 35 MB), so if you don't have unlimited Internet on your phone, better connect to wifi networks and then download. Usually this file is not downloaded inside the archive, but immediately as an installation file. Therefore, you do not need to unpack it or do any other additional steps.
2. Run the file, wait for the installation. If at startup you receive messages about the need to change security settings, then disable it. Be sure to turn it back on after installation! You may also need permissions to access the Internet, camera, microphone, etc. We allow everything, otherwise the program will not install.
3. We register in whatsapp using a phone number and SMS with confirmation, and start using it!
After registering and logging in, you will be able through Whatsapp:
- communicate using text messages, audio or video conferencing;
- send photos, videos, documents, add emoticons;
- take part in communication in general groups;
- see who from your contact book already has WhatsApp, and invite those who do not have it installed yet.
There are few models of phones and smartphones that are released under the Bada operating system, but they exist, and it is likely that in the future Samsung will continue to produce smartphones with this operating system. Now all smartphones of the Wave series are equipped with the Bada OS. Full list models in the table below.