×
Namespaces

Variants
Actions

How to retrieve S60 5th Edition device model name

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
S60 5th Edition
Article
Created: kiran10182 (17 Feb 2010)
Last edited: hamishwillee (19 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 19 September 2012, at 02:22.
50 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.

×