Uncategorized

Getting the Model Name of a device in Bada 2.0

Getting the model name of a device in Bada 2.0 doesn’t have anything in the SDK documentation but can be accessed like this:

#include <FSysSystemInfo.h>

String deviceModel;
Osp::System::SystemInfo::GetValue(L”ModelName”, deviceModel);
AppLog(“Model Name %S”, deviceModel.GetPointer());

Also, remember to set the correct privilege in the manifest.xml

<Privilege>
<Name>SYSTEM_SERVICE</Name>
</Privilege>

It’s a bit worrisome that the SystemInfo keys don’t list “ModelName” as a value key. Hopefully there won’t be any breaking changes.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s