Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:S60音乐播放程序无法单独启动

From Wiki
Jump to: navigation, search

Archived.png存档: 这篇文章是存档,因为考虑到今天它与第三方开发者建立商业解决方案不相关。

Article Metadata

兼容于
平台: S60 3rd Edition FP1
S60 3rd Edition FP2
S60 3rd Edition FP1

文章
翻译:
hoolee
最后由 hamishwillee 在 24 Aug 2012 编辑
  • 详细描述

缺省的S60音乐播放程序无法以独立模式启动,播放音频文件。


如Nokia N95 8G以及Nokia N81这两款手机,当试图调用其音乐播放程序播放音频文件时,程序可以启动,但无法播放任何声音文件。


  • 如何重演

使用下列代码片段,启动音乐播放器播放音频文件:

TApaTaskList iTaskList(CCoeEnv::Static()->WsSession());
TBool iExists;
TApaTask iApaTask = iTaskList.FindApp(TUid::Uid(0x102072C3));
iExists = iApaTask.Exists();
if(iExists)
{
// Music player already running
iApaTask.SwitchOpenFile(_L("C:\\Data\\Music.mp3"));
iApaTask.BringToForeground();
}
else
{
// music player is not runnin and needs to be launched
RApaLsSession iAplsSession;
User::LeaveIfError(iAplsSession.Connect());
TThreadId thread;
iAplsSession.StartDocument(_L("C:\\Data\\Music.mp3"), thread, RApaLsSession::ESwitchFiles);
iAplsSession.Close();
}


上列代码片段在S60第三版FP1设备,如N95手机中工作完好。我们能够调用缺省的音乐播放器来播放我们指定的音乐。但是在如N95 8G以及N81手机上,启动播放器后将无法播放声音。


  • 解决方案

在上述设备中,我们只能通过使用Document handler API或AIW框架以播放器内嵌形式来播放音频。

This page was last modified on 24 August 2012, at 06:26.
479 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.

×