Help:how to dynamically call other application in the flash?
Problem: How to dynamically call other application in the flash? This function can be implemented with c++ as follows.
Question: Does flashlite provides an api like RApaLsSession.StartDocument()? If not, is there any other method to solve this problem?
Thanks!
void RunApp{
RApaLsSession apaLsSession;
const TUid KOSSBrowserUidValue = {0x20003ADB}; //App UID
HBufC* param = HBufC::NewLC(256); // Symbian string
param->Des().Zero();
param->Des().Copy(_L("-open e:\\preview\\VI_Fearless-qvga.smv")); //App argument
TUid id(KOSSBrowserUidValue);
TApaTaskList taskList(CEikonEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(id);
if(task.Exists()) //if App already run, bring it foregroud
{
task.BringToForeground();
HBufC8* param8 = HBufC8::NewLC(param->Length());
param8->Des().Append(*param);
task.SendMessage(TUid::Uid(0), *param8); // UID not used
CleanupStack::PopAndDestroy(param8);
}
else //if App not Run, start it
{
if(!apaLsSession.Handle())
{
User::LeaveIfError(apaLsSession.Connect());
}
TThreadId thread;
User::LeaveIfError(apaLsSession.StartDocument(*param, KOSSBrowserUidValue, thread));
apaLsSession.Close();
}
CleanupStack::PopAndDestroy(param); //clean up CleanupStack
}
Re: Help:how to dynamically call other application in the flash?
Hi Stormbee,
Flash Lite has a dedicated fscommand to perform this... the syntax is as follow:
status = fscommand("launch", "z:\\system\\apps\\browser\\browser.app,http://wap.yahoo.com");
}
This command for example launch a specific webpage on the phone browser. You can find a complete description for this command in Flash Ide help. Hope this helps.
Leonardo
Re: Help:how to dynamically call other application in the flash?
Remember also that you do not need the full path, on S60 3.x you can simply use the exe name as they are all in the same folder.
Re: Help:how to dynamically call other application in the flash?
Thank you very much for your reply!
I tried to use fscommand as follows on N77(s60 v3,flash lite 1.1). Unfortunately, it can't work:(
fscommand("Launch", "browser.exe,http://www.google.cn");
Re: Help:how to dynamically call other application in the flash?
try this:
fscommand("launch", "browser.exe,http://bbc.co.uk");
Re: Help:how to dynamically call other application in the flash?
Thanks!
I installed the flashlite2_1_symbian_s60V3.SIS in N77, and then the fscommand worked well(automatically run the browser and connect to the website)!
But it didn't work in the default flash lite in N77. Maybe the default flash lite is too obsolete?
[QUOTE=markadoherty;425862]try this:
fscommand("launch", "browser.exe,http://bbc.co.uk");[/QUOTE]
Re: Help:how to dynamically call other application in the flash?
The N77 has by default Flash Lite v1.1 and probably without the required support.
Re: Help:how to dynamically call other application in the flash?
yeah, I think so:)
[QUOTE=petrib;426434]The N77 has by default Flash Lite v1.1 and probably without the required support.[/QUOTE]
Re: Help:how to dynamically call other application in the flash?
Thank you!~~
[QUOTE=bytesm;424075]Hi Stormbee,
Flash Lite has a dedicated fscommand to perform this... the syntax is as follow:
status = fscommand("launch", "z:\\system\\apps\\browser\\browser.app,http://wap.yahoo.com");
}
This command for example launch a specific webpage on the phone browser. You can find a complete description for this command in Flash Ide help. Hope this helps.
Leonardo[/QUOTE]