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:How to make Flash launcher with Symbian C++

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

Article Metadata
Article
Created: symbianyucca (19 Mar 2007)
Last edited: hamishwillee (14 May 2013)

To have an icon in normal menu you need to make a Symbian application and you need to define the normal application framework etc. These you can do with the application wizard. How to change the application icon is shown in How to define application icon. Then just add the codes to the application user interface class.

Contents

Symbian S60 3rd Edition devices

With S60 3rd Edition you can use RFile with Document handler as follows (shown also in Run_Flash.cpp file):

iHandler = CDocumentHandler::NewL( NULL );
iHandler->SetExitObserver(this);
 
TFindFile AufFolder(CCoeEnv::Static()->FsSession());
if(KErrNone == AufFolder.FindByDir(KTxtFlashFileName, KNullDesC))
{
RFile Runfile;
User::LeaveIfError(Runfile.Open(CCoeEnv::Static()->FsSession(), aFlashAppName, EFileShareReadersOnly));
CleanupClosePushL(Runfile);
 
TDataType Dummy;
 
User::LeaveIfError(iHandler->OpenFileEmbeddedL(Runfile, Dummy));
 
CleanupStack::PopAndDestroy(); // sharedfile
}

Note that you also need to implement the MAknServerAppExitObserver in your Application user interface class.

Symbian S60 3rd Edition FP1 devices

... dedicated API ...

Symbian S60 Pre-3rd Edition devices

With 2nd Edition you can utilize the RApaLsSession directly as follows (shown also in Run_Flash2.cpp file):

RApaLsSession session;
session.Connect();
CleanupClosePushL(session);
 
TFindFile AppFile(CCoeEnv::Static()->FsSession());
if(KErrNone == AppFile.FindByDir(KTxtFlashFileName, KNullDesC))
{
TThreadId id;
User::LeaveIfError(session.StartDocument(AppFile.File(), id));
}
 
CleanupStack::PopAndDestroy();//session.Close();


Run_Flash2.cpp

#include <apgcli.h>
 
_LIT(KTxtFlashFileName, ":\\others\\MyFlashFile.swf" );
//_LIT(KTxtFlashFileName, ":\\private\\<My-SID>\\MyFlashFile.swf" );
 
 
void CFlashStubAppUi::ConstructL()
{
BaseConstructL(CAknAppUi::EAknEnableSkin);
 
RApaLsSession session;
session.Connect();
CleanupClosePushL(session);
 
TFindFile AppFile(CCoeEnv::Static()->FsSession());
if(KErrNone == AppFile.FindByDir(KTxtFlashFileName, KNullDesC))
{
TThreadId id;
User::LeaveIfError(session.StartDocument(AppFile.File(), id));
}
 
CleanupStack::PopAndDestroy();//session.Close();
 
User::Exit(0);
}
 
CFlashStubAppUi::CFlashStubAppUi()
{
// No implementation required
}
 
CFlashStubAppUi::~CFlashStubAppUi()
{
 
}
 
void CFlashStubAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
default:
break;
}
}


Run_Flash.cpp

#include <documenthandler.h>
#include <apgcli.h>
 
_LIT(KTxtFlashFileName, ":\\others\\MyFlashFile.swf" );
//_LIT(KTxtFlashFileName, ":\\private\\<My-SID>\\MyFlashFile.swf" );
 
void CFlashStubAppUi::ConstructL()
{
BaseConstructL(CAknAppUi::EAknEnableSkin);
 
iHandler = CDocumentHandler::NewL( NULL );
iHandler->SetExitObserver(this);
 
TFindFile AufFolder(CCoeEnv::Static()->FsSession());
if(KErrNone == AufFolder.FindByDir(KTxtFlashFileName, KNullDesC))
{
RFile Runfile;
User::LeaveIfError(Runfile.Open(CCoeEnv::Static()->FsSession(), aFlashAppName, EFileShareReadersOnly));
CleanupClosePushL(Runfile);
 
TDataType Dummy;
 
User::LeaveIfError(iHandler->OpenFileEmbeddedL(Runfile, Dummy));
 
CleanupStack::PopAndDestroy(); // sharedfile
}
}
 
CFlashStubAppUi::CFlashStubAppUi()
{
// No implementation required
}
 
CFlashStubAppUi::~CFlashStubAppUi()
{
delete iHandler;
}
 
void CFlashStubAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
default:
break;
}
}
 
void CFlashStubAppUi::HandleServerAppExit (TInt /* aReason */)
{
Exit();
}
This page was last modified on 14 May 2013, at 03:15.
85 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.

×