You Are Here:

Community: Wiki

This page was last modified on 24 October 2008, at 20:04.

TSS000037 - Embedded camera view in an application

From Forum Nokia Wiki


ID TSS000037 Creation date March 4, 2003
Platform S60 1st Edition
S60 2nd Edition
Devices
Category Symbian C++ Subcategory Multimedia


Keywords (APIs, classes, methods, functions):

Overview

How can I add the camera view to an application, such as the Insert->New Image option in the Messaging Application?

Description

The following code lines demonstrate how to embed the camera application within an application. Besides the function that starts the camera application, MApaEmbeddedDocObserver::NotifyExit() must be implemented. It is called when the user has exited the camera application.

Solution

void MyApplication::NewImage()
   {
   const TUid KUidCamera    = { 0x1000593F };
   RApaLsSession apaLs;
   TApaAppInfo   appInfo;
   CApaDocument* doc = NULL;
   CEikProcess*  process = CEikonEnv::Static()->Process();
   User::LeaveIfError(apaLs.Connect());
   CleanupClosePushL(apaLs);
   User::LeaveIfError(apaLs.GetAppInfo(appInfo, KUidCamera));
   doc = process->AddNewDocumentL(appInfo.iCaption, KUidCamera);
   CleanupStack::PopAndDestroy(); // apaLs
   TApaDocCleanupItem cleanup(process, doc);
   CleanupStack::PushL(cleanup);
   doc->NewDocumentL();
   CleanupStack::Pop(); // cleanup
   doc->EditL(this, ETrue);
   }
void MyApplication::NotifyExit(TExitMode aMode)
   {
   // camera view has been closed
   }

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia