WEB开发网
开发学院手机开发Symbian 开发 Symbian 3rd 开机自启动在后台运行实现 阅读

Symbian 3rd 开机自启动在后台运行实现

 2010-03-10 16:17:00 来源:WEB开发网   
核心提示:User::LeaveIfError(appSession.GetAppInfo(appInfo, KMenuUid));CApaCommandLine* cmd = CApaCommandLine::NewLC();cmd->SetExecutableNameL(appInfo.iFullName);cmd-&

User::LeaveIfError(appSession.GetAppInfo(appInfo, KMenuUid));

CApaCommandLine* cmd = CApaCommandLine::NewLC();

cmd->SetExecutableNameL(appInfo.iFullName);

cmd->SetCommandL(EApaCommandRun);

appSession.StartApp(*cmd);

CleanupStack::PopAndDestroy(2, &appSession); // cmd, appSession

}

2、在PKG文件中设置在文件安装后运行。

在S60 3.0上如果要想实现同样的效果pkg文件里必须使用"FILERUN,RUNINSTALL"指令的简写形式:

如下:

"D:Symbian9.1S60_3rd_MR_3Epoc32datazesourceappsBKG_0xE7B05EF9.rsc" -"!:esourceappsBKG_0xE7B05EF9.rsc"

"D:Symbian9.1S60_3rd_MR_3Epoc32datazprivate10003a3fappsBKG_0xE7B05EF9_reg.rsc" -"!:private10003a3fimportappsBKG_0xE7B05EF9_reg.rsc"

"D:Symbian9.1S60_3rd_MR_3Epoc32datazesourceappsBKG_0xE7B05EF9.mif" -"!:esourceappsBKG_0xE7B05EF9.mif"

"D:Symbian9.1S60_3rd_MR_3Epoc32datazprivate101f875aimport[E7B05EF9].rsc"-"!:private101f875aimport[E7B05EF9].rsc"

"D:Symbian9.1S60_3rd_MR_3Epoc32eleasegcceudebBKG_0xE7B05EF9.exe" -"!:sysinBKG_0xE7B05EF9.exe" ,FR,RI

注意,此时必须使用Symbian sign的证书来对该安装包进行sign, self-sign对FR,RI等指令无效.

个人总结:FILERUN,RUNINSTALL是FR和RI的简写

"D:Symbian9.1S60_3rd_MR_3Epoc32eleasegcceudebBKG_0xE7B05EF9.exe" -"!:sysinBKG_0xE7B05EF9.exe" ,FR,RI

必须写在pkg文件所有资源文件的最后,才能够实现在安装后自动运行

三、从相关资料学习到的知识:

1、 How to send other Application to Background

#include

Link against: apgrfx.lib

//Constructs the TApaTaskList by taking a reference to a window server session

TApaTaskList tasklist(iCoeEnv->WsSession());

//Taking a reference to a window server session of SomeOtherApp.

TApaTask task(tasklist.FindApp(_L("SomeOtherApp")));

// Send the application to Background.

上一页  1 2 3 4  下一页

Tags:Symbian rd 开机

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