Identifying the type of phone your application is running on is sometimes useful for optimised application (or to handle compatibility across different OS platforms). Symbian OS has the capabilities to identify a mobile device:
at execution time: this is most useful to execute device specific code
at installation time: this is generally used for installing device-dependent files (ex: bitmaps) or code with heavy platform dependencies.
Identification at execution
One of them is at code execution. A Call to the HAL::Get() function will return a code identifying your device hardware :
#include <hal.h> // also link to hal.lib
TInt mUid = 0;
HAL::Get(HALData::EMachineUid, mUid);
For Nokia Series60 devices the mUID will be unique for each device type:
| NS60 Mobiles | | mUid value |
| Nokia 3230 | | 0x10200f97 |
| Nokia 3650 | | 0x101f466a |
| Nokia 3660 | | 0x101f466a |
| Nokia 6260 | | 0x101fb3f4 |
| Nokia 6600 | | 0x101fb3dd |
| Nokia 6620 | | 0x101f3ee3 |
| Nokia 6630 | | 0x101fbb55 |
| Nokia 6670 | | 0x101fb3f3 |
| Nokia 6680 | | 0x10200F99 |
| Nokia 6681 | | 0x10200F9C |
| Nokia 6682 | | 0x10200F9B |
| Nokia 7610 | | 0x101fb3f3 |
| Nokia 7650 | | 0x101f4fc3 |
| Nokia N-Gage | | 0x101f8c19 |
| Nokia N-Gage QD | | 0x101FB2B1 |
| Nokia N70 | | 0x10200F9A |
| Nokia N90 | | 0x10200F98 |
| Sendo-X | | 0x101FA031 |
| Siemens SX1 | | 0x101F9071 |
| Samsung SGH D730 | | 0x101FE7B7 |
| NS80 | | mUid value |
| Nokia 9210 and 9290 | | 0x10005e33 |
| Nokia 9500 | | 0x101f6b26 |
| UIQ Mobiles | | mUid value |
| Sony Ericsson P800 | | 0x101F408B |
| Sony Ericsson P900 | | 0x101FB2AE |
| Sony Ericsson P910 | | 0x10200AC6 |
| Motorola A9xx | | 0x101f6b26 |
Identification at installation
The identification of the mobile at installation allow to install different files on different devices. A modification of the PKG file is needed. The UIDs shown above are still valid:
;
; Files to install
;
IF MachineUID=0x101fb3dd; 6600
; install Nokia 6600 specific files
"\Symbian\6.1\Series60\Epoc32\release\thumb\urel\EZBoot6600.ini" -"!:\system\apps\EZBoot\EZBoot.ini"
ELSEIF MachineUID=0x101f466a ; 3650
; install Noka 3650 specific files
"\Symbian\6.1\Series60\Epoc32\release\thumb\urel\EZBoot3650.ini" -"!:\system\apps\EZBoot\EZBoot.ini"
ELSE
; install file for other devices
"\Symbian\6.1\Series60\Epoc32\release\thumb\urel\EZBoot.ini" -"!:\system\apps\EZBoot\EZBoot.ini"
ENDIF
This installs a EZBoot.ini file that is tailored for specific devices (here Nokia 6600 and Nokia 3650).
If you have more codes... please post them below, I will add them in the article.
|