Significant Technical Interview Questions On Bada
Q – 1 How to upgrade my firmware?
Ans- You can upgrade your firmware by connecting your phone to Kies.
Q – 2 Can you please explain what kind of options are available to integrate ads within an application in bada 2.0?
Ans- 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.
Q – 3 How to load a local HTML file on the device with a Web control?
Ans- 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”.
Q – 4 How to add a ScrollPanel, created using the ScrollPanel resource in the UI Builder, to a Form?
Ans- 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.
Q – 5 Tell me what types of layout are supported?
Ans- The following layouts are supported
GridLayout
HorizontalBoxLayout
RelativeLayout
VerticalBoxLayout
Q – 6 How to find the heap memory usage for the currently running application?
Ans- You can get the available heap memory using the Osp::System::RuntimeInfo class.
Q – 7 How to check the firmware version on a test phone?
Ans- 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.
Q – 8 How to make the result of GetMaxTransactionCount() larger than one?
Ans- 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);
Q – 9 How to get the subnet mask?
Ans- Use the Osp::Net::NetConnectionInfo::GetSubnetMaskAddress() method to get the subnet mask.
Q – 10 How to get the IP address of a device (both dynamic IP and static IP)?
Ans- You can use NetConnectionInfo::GetLocalAddress() to get the IP addresses (both). See the bada API Reference for further details.
Q – 11 Explain what are the different HTTP session modes?
Ans- 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.
Q – 12 How to enable HTTP chunked mode?
Ans- 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.
Q – 13 Tell me can we use the local loopback (127.0.0.1)?
Ans- 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.
Q – 14 Explain does bada provide APIs for SSL, encryption, and decryption?
Ans- 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.
Q – 15 How to simulate locations?
Ans- 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.
Q – 16 How to zoom in and zoom out on the map?
Ans- 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.
Q – 17 do I still need all the privileges in the manifest file when I use free map apps and the Navteq ads?
Ans- 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.
Q – 18 Please tell us is there any way for bada to set GPS info while capturing?
Ans- 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.
Q – 19 Tell me can I use UI Builder to design map applications?
Ans- Yes, from bada version 2.0 onwards, the map control is available in UI Builder.
Q – 20 Tell me can I set the image file path for markers and info windows?
Ans- 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.
Q – 21 Tell me can I rotate the map?
Ans- Yes. From SDK version 2.0 onwards, it is possible to rotate maps.
Q – 22 Suppose I am unable to get any GPS data at my work location. What are the possible reasons?
Ans- 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.
Q – 23 Suppose 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 ?
Ans- 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);
Q – 24 How to change the locale? Is there an API for it?
Ans- Samsung bada does not support changing locales within an application. However, you can change the locale by changing the language in the Settings menu.
Q – 25 Tell me what mechanisms are available to establish communications between two different applications?
Ans- Applications can communicate asynchronously through channels (ClientChannel and ServerChannel). Channels encapsulate the underlying IPC mechanism and communication is simplified through them.
Q – 26 How to view or check files that my application has created for testing purposes when I run the application on the Emulator?
Ans- If you want to check for a file in the Home folder, use File::IsFileExist().
Q – 27 How to emulate the storage card availability in the Emulator?
Ans- You can do this with the Event Injector. Right-click on Emulator > Event Injector > Device > MMC Insert.
Q – 28 How to secure or encrypt my files and databases?
Ans- 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.
Q – 29 Tell me which version of OpenGL is supported?
Ans- Samsung bada supports OpenGL® ES 1.1 and 2.0, which are subsets of the OpenGL® 3D graphics API designed for embedded devices.
Q – 30 How to insert emoticons in text?
Ans- 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.
Q – 31 How to support multiple languages?
Ans- 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.
Q – 32 Suppose My application needs to store the application state, even if it is being terminated by the system. How can I do this?
Ans- 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().
Q – 33 How to bring a multitasking enabled application, to the foreground programmatically?
Ans- You can use the LaunchApplication() method with the current application’s AppId to bring your app to the foreground.
Q – 34 How to change my application settings?
Ans- Under the menu bada Developers > My Applications > Application Manager you will find a list of your existing applications. Click on the name of the application you wish to modify, then the version. On the details page, click [Modify] button.
Q – 35 How to make my application multitasking enabled?
Ans- You can do it in the project properties window as shown below:
Project Properties > bada build > Application Information > check the Multitasking checkbox.
Q – 36 Do you know Samsung bada promises to support multitasking. What is the maximum number of bada applications that can run simultaneously?
Ans- 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.
Q – 37 Suppose 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?
Ans- 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.
Q – 38 Tell me can an application send an event to itself and capture it?
Ans- An application can send user events to itself using Osp::App::SendUserEvent() and capture the event using Osp::App::OnUserEventReceived().
Q – 39 Tell me Is there a global copy/paste feature? Can I copy text from one application and paste it into another one?
Ans- 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.
Q – 40 Will a running bada application get key and Ui events if the phone goes into the Locked state?
Ans- 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.
Q – 41 Tell me which game engine has been ported to bada?
Ans- AirPlay, a 3D game engine, has been ported to bada, and is now available for you to use.
Q – 42 How to do a screenshot in bada?
Ans- Screenshots: Home (OK) key + hold key press (press Home key first)
Screenshots are located in /media/images.
Q – 43 How to get descriptions for error codes?
Ans- Right-click on the Emulator and select “Error Lookup”. Enter the error code number to get the description of the error code.
Q – 44 Tell us what you know about Bada?
Ans- Bada is an operating system for mobile devices such as smartphones and tablet computers. It is developed by Samsung Electronics. Its name is derived from ocean or sea in Korean. It ranges from mid- to high-end smartphones.