Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How to retrieve S60 5th Edition device model name

From Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
S60 5th Edition
Article
Created: kiran10182 (17 Feb 2010)
Last edited: hamishwillee (18 Sep 2012)


Contents

Overview

From S60 5th Edition onwards, devices also have a file named product.txt in the z:\resource\versions\ directory. It contains more detailed information about the device, in the following format:

Manufacturer=<ManufacturerName>
Model=<ModelName>
Product=<ProductCode>
Revision=<RevisionNumber>

The device model name can be read from this file z:\resource\versions\product.txt

Code snippet

_LIT(KFilename,"Z:\\resource\\versions\\product.txt");
RFile file;
User::LeaveIfError(file.Open(CCoeEnv::Static()->FsSession(),KFilename,EFileRead));
CleanupClosePushL(file);
TFileText text;
text.Set(file);
TBuf16<128> szModelName;
for(TInt i=0; i<2; i++) // TFileText::Read() reads one line at a time and our model information is in the second line.
{
User::LeaveIfError(text.Read(szModelName));
}
CleanupStack::PopAndDestroy(&file);
CAknInformationNote* note = new (ELeave) CAknInformationNote(ETrue);
note->ExecuteLD(szModelName);

Output

The model name will be in this format: Model=5800 xPressMusic

See also

Internal references

This page was last modified on 18 September 2012, at 23:22.
44 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×