WEB开发网
开发学院手机开发Symbian 开发 Symbian 手机平台开发经验总结 阅读

Symbian 手机平台开发经验总结

 2010-06-22 03:00:00 来源:WEB开发网   
核心提示:15、获取手机剩余内存字节数TMemoryInfoV1Buf info;UserHal::MemoryInfo(info);来源:(http://blog.sina.com.cn/s/blog_494e45fe0100cg58.html) - Symbian手机平台开发经验总结_教皇_新浪博客TInt freeMemo

15、获取手机剩余内存字节数

TMemoryInfoV1Buf info;

UserHal::MemoryInfo(info);

来源:(http://blog.sina.com.cn/s/blog_494e45fe0100cg58.html) - Symbian手机平台开发经验总结_教皇_新浪博客

TInt freeMemory = info().iFreeRamInBytes;

16、控制用户输入长数字串

void CTestDlgDialog::PrepareLC(TInt aResourceId)

{

CEikDialog::PrepareLC( aResourceId );

// Pick up the Editor control from the dialog

CEikEdwin* control = static_cast(ControlOrNull(EMyQuery));

// Set the input mode

control->SetAknEditorInputMode(EAknEditorNumericInputMode);

// Restrict the other input modes

control->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);

}

17、播放wav声音文件

const TInt KSnapSoundId = 2;

CAknKeySoundSystem* iCameraSound;

iCameraSound = static_cast(CEikonEnv::Static()->AppUi())->KeySounds();

if (iCameraSound)

{

TRAPD(error, iCameraSound->AddAppSoundInfoListL(R_CAMERA_SNAP_SOUND));

if ((error != KErrAlreadyExists) && (error != KErrNone))

{

User::LeaveIfError(error);

}

}

iCameraSound->PlaySound(KSnapSoundId);

//以下在rss文件中定义

#define KcameraSoundFile "Z:\system\sounds\digital\Camera1a_2_8kHz.wav"

#define KSnapSoundId 2

RESOURCE AVKON_SOUND_INFO_LIST r_camera_snap_sound

{

list =

{

AVKON_SOUND_INFO

{

sid = KSnapSoundId;

priority = 45;

preference = EAknAudioPrefCamera; // defined in avkon.hrh

file = KCameraSoundFile;

}

};

}

18、搜索可用的WLAN网络

#include

上一页  1 2 3 4 5 6 7  下一页

Tags:Symbian 手机 平台

编辑录入:coldstar [复制链接] [打 印]
赞助商链接