如何获得手机的UserAgent?
IMPORT_C HBufC8* SysUtil::UserAgentStringL ( ) [static]
Returns the device specific user agent string, which is used for example in HTTP headers.
Returns:
user agent string, ownership transfered to the caller.
#include <sysUtil.h>
Link against: sysutil.lib
在模拟器(S60 2nd fp2 SC)上实验的结果:userAgent为
Nokia6630/4.06.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1
在N70上实验结果:userAgent为
NokiaN70-1/5.0705.3.0.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1