Go to Content



FAQ for SDK

Home > Support > FAQ

Expand All Hide All

SDK Installation

During installation, you may encounter a network problem like 'HTTP/1.1 404 Not Found'.
If this occurs, download the necessary files from the File Download table in this page.

File Download

Updated : Feb 28, 2013
File Name Description File Size MD5 Checksum
bada_SDK_2.0.6_Common.zip SDK 2.0.6 Common File 678,890,944 (bytes) 648F6032967C151438428F10CA43F644
bada_SDK_2.0.6_WaveHVGA.zip SDK 2.0.6 Wave(HVGA) File 149,515,264 (bytes) 5CD3FF1B5DAB604976639128A963E888
bada_SDK_2.0.6_WaveWQVGA.zip SDK 2.0.6 Wave(WQVGA) File 164,102,898 (bytes) CA8DCBCF55DA72E5BC27511C1F250168
bada_SDK_2.0.6_WaveWVGA.zip SDK 2.0.6 Wave(WVGA) File 203,368,358 (bytes) 9B1CA77DE6FC7AD5F35CA4682CE73B47

bada SDK / IDE

When I build my project, I am getting the error "make: *** [xxxx.exe] Error 255 input line too long".
This occurs because your application has too many object files (in other words, the command is too long) and the console in the IDE can't handle the command. One solution to this is to split your project into static libraries
How can I get descriptions for error codes?
Right-click on the Emulator and select "Error Lookup". Enter the error code number to get the description of the error code.
How can I delete built-in values from paths and symbols in the project properties?
For path settings:
Right-click on your project and choose Properties > C/C++ Build > Settings > Tool Settings (tab) > bada C++ Compiler to set compiler options, or bada C++ Linker to set linker options.

For symbol settings:
Right-click on your project and choose Properties > bada Build to set SDK root.
Right-click on your project and choose Properties > C/C++ Build > Environment to set Environment variables.
How can I add additional libraries to a project?
You can add them under Project Properties > C/C++ Build > Settings > bada C++ Linker > Other objects.

General

Is it possible to update an existing application while it is "In Operation" without deleting the actual application?
It is possible to update an existing application while it is "In Operation" without deleting the actual application by going to My Applications > Application Manager > Application on sale, clicking on the app title, then clicking on the "Add version" button present in the top right.
How can I do a screenshot in bada?
Screenshots: Home (OK) key + hold key press (press Home key first)
Screenshots are located in /media/images.
Which game engine has been ported to bada?
AirPlay, a 3D game engine, has been ported to bada, and is now available for you to use.

App

Will a running bada application get key and Ui events if the phone goes into the Locked state?
No. When the phone goes into Locked mode, the running bada application goes into the Background state. Key events, such as volume up and down or the end key, are not sent to the running bada application.
Is there a global copy/paste feature? Can I copy text from one application and paste it into another one?
Yes, however it is only available for text. You can do this in the Edit Field to copy/paste from one bada application/native application to another (bada app/native app). Double-clicking or long pressing on some text gives you this option.
Can an application send an event to itself and capture it?
An application can send user events to itself using Osp::App::SendUserEvent() and capture the event using Osp::App::OnUserEventReceived().
When a user presses the End button to kill the application, I want to stop this from happening so that the user can be prompted whether they want to save the state or not?
No, the application cannot stop itself from being terminated. If you must save the data, you can save it in the onAppTerminating () method, but you cannot provide any UI elements as the application is terminating. An alternative is to provide a settings page to get the user's preferences and use the appropriate logic in the onAppTerminating() method.
Samsung bada promises to support multitasking. What is the maximum number of bada applications that can run simultaneously?
Depending on the memory usage of applications and the physical memory size, the number of applications that can be run at the same time may vary somewhat.
How can I make my application multitasking enabled?
You can do it in the project properties window as shown below:
Project Properties > bada build > Application Information > check the Multitasking checkbox.
How can I bring my multitasking enabled application, to the foreground programmatically?
You can use the LaunchApplication() method with the current application's AppId to bring your app to the foreground.
My application needs to store the application state, even if it is being terminated by the system. How can I do this?
In such cases the checkpoint event is fired and bada provides an event listener (IAppCheckpointEventListener) for it. You can save your application state or context within the OnAppCheckpointing() callback method. You can also save your application sate on OnAppTerminating().
How can I support multiple languages?
You can use string resources with resource IDs where each string corresponding to an entry for each language can be added and identified using its respective resource ID. The same can be accessed in your application using the GetAppResource()->GetString( >string id> ) method.

Graphics

How can I insert emoticons in text?
EnrichedText is the best candidate for this. By using EnrichedText, you can easily mix various styles and resources in text. In this case, you can insert bitmaps into text with the Osp::Graphics::EnrichedText::Add(const Osp::Graphics::Bitmap & bitmap) method.
Which version of OpenGL is supported?
Samsung bada supports OpenGL® ES 1.1 and 2.0, which are subsets of the OpenGL® 3D graphics API designed for embedded devices.

Io

How can I secure or encrypt my files and databases?
You can encrypt files using Construct() with the secureMode parameter.
For example, if you want to create secure files, use File::Construct(const Osp::Base::String &filePath, const Osp::Base::String &openMode, bool secureMode, bool createParentDirectories).
If you want to create secure database files, use Database:: Construct (const Osp::Base::String &databasePath, long openMode, bool secureMode, long option).
Also, bada provides methods for converting normal files and databases to secure, encrypted ones with the ConvertToSecureFile() and ConvertToSecureDatabase() methods.
How can I emulate the storage card availability in the Emulator?
You can do this with the Event Injector. Right-click on Emulator > Event Injector > Device > MMC Insert.
How can I view or check files that my application has created for testing purposes when I run the application on the Emulator?
If you want to check for a file in the Home folder, use File::IsFileExist().
What mechanisms are available to establish communications between two different applications?
Applications can communicate asynchronously through channels (ClientChannel and ServerChannel). Channels encapsulate the underlying IPC mechanism and communication is simplified through them.

Locales

How can I change the locale? Is there an API for it?
Samsung bada does not support changing locales within an application. However, you can change the locale by changing the language in the Settings menu.
I have ISO 3166-1 country code information from a server. How do I convert it to a country name that is readable by a user ?
Construct a Locale object with the required country code and get the name of the country from the Locale object

For example:
Locale locale(LANGUAGE_ENG, COUNTRY_US);
Osp::Base::String countryName;
locale.GetCountryName(countryName);

Locations

I am unable to get any GPS data at my work location. What are the possible reasons?
GPS values are not sensed correctly in closed environments. Check the values in an open area.
Especially in indoor environments, GPS signals cannot be sensed. In that case, network positioning can help to get proper location data. Enable the network positioning option under Settings > Location > Network position.
Can I rotate the map?
Yes. From SDK version 2.0 onwards, it is possible to rotate maps.
Can I set the image file path for markers and info windows?
Yes. It is possible to set the path of an image to show in an info window as well as for markers using the SetContent() method.
Can I use UI Builder to design map applications?
Yes, from bada version 2.0 onwards, the map control is available in UI Builder.
Is there any way for bada to set GPS info while capturing?
Yes. Samsung bada provides a method to set GPS information. Use the SetExifGpsCoordinates() method to set GPS coordinates in the EXIF field in the captured data.
Do I still need all the privileges in the manifest file when I use free map apps and the Navteq ads?
From 2.0 onwards, you do not need to use the deCarta ads library for free maps. Instead, you can use the Ad namespace with Navteq for the advertising network. In this case, the only privilege needed is AD_SERVICE.
How can I zoom in and zoom out on the map?
You can zoom in by double tapping and zoom out can with 2-finger touch. Pinch-to-zoom (multi-touch) is supported for both zoom in and zoom out.
How can I simulate locations?
Right click on the Emulator and select Event Injector > Locations
You can provide the input as a text file or select points on the map.

To use a text file:
1. Browse to the text file containing NMEA location data as shown below.
2. Click 'Send file'.

To use the map:
1. Select the correct map location.
2. Select points.
3. Click 'Send log'.

I built the 'Navigator' sample and tried to test it in the Emulator. The program seems to work, but it could not render the map.
To use the default location service, the client name and password must be provided in the ROUTE_SVC_EXTRA_INFO defined in the NavigatorConstants.h file. You must contact deCarta (http://developer.decarta.com) and get a client name and password for the location services.

Net

Does bada provide APIs for SSL, encryption, and decryption?
Applications can create secure connections by using the Osp::Net::Http class and Osp::Net::Sockets::SecureSocket class. The SecureSocket class uses the SSL protocol to make connections.
The Osp::Security namespace provides all the encryption and decryption classes.
Can I use the local loopback (127.0.0.1)?
Samsung bada does not support it out of the box. However, if you create a socket with your own system IP address, that can act like the local loopback for you.
How can I enable HTTP chunked mode?
1. Add a header field to a request header for "Transfer-Encoding", set the value to "chunked".
2. Use the HttpTransaction::EnableTransactionReadyToWrite() method.
3. Implement the OnTransactionReadyToWrite() method to send more chunks. An empty chunk is considered to be the last chunk.
What are the different HTTP session modes?
HTTP supports NORMAL and PIPELINING session modes. All transactions within these sessions are submitted through the same connection. While only one transaction is processed at a time in normal mode, multiple transactions can be pipelined in pipelining mode. In normal mode, you must wait for the end of the previous transaction in order to submit the next transaction.
How can we get the IP address of a device (both dynamic IP and static IP)?
You can use NetConnectionInfo::GetLocalAddress() to get the IP addresses (both). See the bada API Reference for further details.
How can I get the subnet mask?
Use the Osp::Net::NetConnectionInfo::GetSubnetMaskAddress() method to get the subnet mask.
How can I make the result of GetMaxTransactionCount() larger than one?
When constructing a session, instead of using NET_HTTP_SESSION_MODE_NORMAL, use NET_HTTP_SESSION_MODE_PIPELINING.

For example:
r = pSession->Construct(NET_HTTP_SESSION_MODE_PIPELINING, &proxyAddr, hostAddr, null);
Are Bluetooth and Wi-Fi supported in the Emulator?
Currently, there is no support for Bluetooth or Wi-Fi in the Emulator.
Can I use sockets in worker threads?
It depends on the socket mode. If you use a blocking socket, it works fine in worker threads. However, non-blocking sockets can only be used in event driven threads.
Can I connect my device with a Wi-Fi AP and setup an adhoc Wifi network simultaneously?
Only one mode is supported at a time.
Is there any FTP support in bada?
No. However the FTP protocol can be implemented using sockets.
What are the relevant classes, APIs and methods for NFC?
NFC is supported in bada 2.0. Look at the Osp::Net::Nfc namespace reference in the help documentation. It provides all the relevant information about the API and methods for NFC.

Social

Is there any way to set ringtones?
You can use result Osp::Social::Contact::SetValue ( ContactPropertyId id, const Osp::Base::String & value) to set ringtones. For example:
pContact->SetValue(CONTACT_PROPERTY_ID_RINGTONE, L"/Media/Sounds/Music/Ring.mp3");
This sets a ringtone for a particular contact. If you want to set a ringtone globally, you can use the Osp::System::SettingInfo::SetRingtone() method.
What is the site URL to register an app in Facebook?
Use https://snsgw.samsungmobile.com/facebook/auth/callback/ for the site URL when registering your app in Facebook. Refer to bada IDE > Help > Help Contents > bada C++ App Programming > Developer Guide > Social: Managing Social Networks > SNS Authentication>Authentication Information for Facebook for more details.

System

Does bada provide a backlight time setting function that relates to dimming the screen?
Currently there is no method in bada that can change the backlight time settings. However, you can change it on a device by going to Settings > Display > Backlight time.
How can I check the firmware version on a test phone?
Currently there is no method to do this. However, you can check the firmware version of your device by going to Settings > General > About Phone > Version.
How can I find the heap memory usage for the currently running application?
You can get the available heap memory using the Osp::System::RuntimeInfo class.
Does bada have a class to programmatically get the IMEI number and model number?
No. Currently bada does not support any class to get the IMEI or the model number.
How can I make my application react to changes in system settings?
The ISettingEventListener listener can notify you of changes in the system settings. You can have your application react to these events inside the OnSettingChanged() callback method.
How can I customize the screen brightness for my application?
Use the PowerManager::SetScreenBrightness() method to adjust the screen brightness. The brightness set by an application is only available when it is working in the foreground.

UI

What types of layout are supported?
The following layouts are supported
GridLayout
HorizontalBoxLayout
RelativeLayout
VerticalBoxLayout
Can I get a callback for OnKeyPressed when the End key is pressed?
No. The OnKeyPressed event is called only for the key codes given in the KEY_CODE enum. The End key does not trigger the OnKeyPressed event.
How can I add a ScrollPanel, created using the ScrollPanel resource in the UI Builder, to a Form?
Create a new ScrollPanel and attach it to a Form; the corresponding ScrollPanel resource is automatically created. Double-clicking the ScrollPanel allows you to then edit the ScrollPanel resource.
Does bada support transitions between two forms?
Use the Osp::Ui::Animations::FrameAnimator class for transitions between two Forms. You can use transition effects by calling the SetCurrentForm() method of the FrameAnimator class just like calling the SetCurrentForm() method of the Frame class. The UiControlAnimator sample shows a detailed implementation.
Which listener notifies about animation events?
The Osp::Ui::Animations::IControlAnimatorEventListener and Osp::Ui::Animations::IFrameAnimatorEventListener listeners can be used to monitor animation events.
How can an application get a notification if a link is clicked?
Add a Link event listener using AddUiLinkEventListener and implement the Osp::Ui::IUiLinkEventListener interface.
Can a ListItem be set to a different height?
Yes. The Osp::Ui::Controls::IIconListViewItemProvider::CreateItem class gives you that flexibility. The UiControls sample in the SDK shows an implementation. The height can be specified in the constructor, Osp::Ui::Controls::CustomItem::Construct().
Does bada 2.0 supports headers and footers? What other new controls are included?
Yes. There are many more new controls added as well, such as SearchBar, SimpleItem, TextBox, Gallery, and OverlayRegion. Refer to the SDK help for more details on these. Also, many existing features have been enhanced, such as animations in lists and a UI Link listener for the EditField.
Can EditArea dynamically adjust to the height of text entered?
Use Osp::Ui::Controls::ExpandableEditArea for dynamically adjusting height.
What SDK samples would help in understanding UI better?
To start, see the UiControls sample for how to use most controls, the AnimationApp sample for how to handle progress animation in different use cases, the UiLayoutDemo sample for layout handling, and the UiControlAnimator sample for all the information on control animation including Form and Panel transitions.

Uix

Why does the Facedetector class only recognize faces correctly only if the device is horizontal and the face is perfectly vertical?
Detection works with an approximate 30 degree rotation in all 3 axes.
Why are not all sensors supported?
Not all sensors are supported on all devices. Check the device manual to see which sensors are supported on that device.
I can load text to speech, but why does it have a delay of 10~20 seconds when I deploy it on a device?
The delay in text to speech depends on the network speed and also on the kind of data being transferred over the network.
I noticed something like silence detection in the code. What is that functionality?
If silence detection is on, then the voice engine will stop recording the speech data once silence is detected. Silence detection is triggered after 2 seconds of silence.

Web

Can I load a remote or local webpage into my application?
Yes. Create an Osp::Web instance and use the LoadUrl () method to load a remote or local webpage into your application.
Can I run my own JavaScript code in a web page?
Use the EvaluateJavascriptN() method to run any arbitrary JavaScript code in a web page.
Is it possible to block multipoint and zoom in a Web control?
The following code sample shows how to block multipoint and zooming:

touch= new Touch();
touch->SetMultipointEnabled(*__pWebControl,false);

You must call the SetMultiPointEnabled() method after the Web control is added to the parent control with Container::AddControl().
How can I load a local HTML file on the device with a Web control?
Samsung bada currently supports the "/Home" virtual path, which is readable and writable, as well as the "/Res" virtual path, which is readable for loading local HTML files. Make sure to store local HTML files in the Home or Res folder as per your (reading and writing) requirements, and specify the file path as "/Home/ .html" or "/Res/ .html".
I would like to use HTML browser features on bada. What browser API is available?
Samsung bada supports the Web control for displaying HTML pages, which can be used as one of the controls in a container. Refer to the Osp::Web namespace in the bada API and look at the WebViewer sample application.

Ads

I was informed that advertisements are permitted in bada apps since Jan 1, 2011. How can I add an advertisement in my application?
The Ad control is supported in bada 2.0, which can be used to add advertisements to bada apps.

However, do note that if you have a free application that uses map-related API features from deCarta, only the embedded deCarta advertisements can be added to screens that include map data.
What kind of options are available to integrate ads within an application in bada 2.0?
The Ad control supports two types of Ads: Image Banner, and Text Banner. When the user touches the Ad, one of the following actions is triggered:

Click-to-Brower: Opens a web page, set by the advertiser, in the default browser.
Click-to-Call: Automatically dials a number set by the advertiser
Click-to-Store: Launches Samsung Apps Store with the product page defined by the advertiser.

For more info, refer to the Osp::Ads::Controls namespace in the help file.