How to retrieve S60 5th Edition device model name
Article Metadata
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


(no comments yet)