You Are Here:

Community: Wiki

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

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
   }

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fTSS001192E5fE2dE5fUsingE5fapplicationE2dspecificE5fcustomE5ffontsX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfnTypeZCommunityContentQ qdcZtypeQUqfnTypeZKnowledgeBaseContentQ qdcZtypeQUqfnTypeZE52esourceQ qdcZtypeQUqfnTypeZTechnicalSolutionQ qdcZtypeQUqfnTypeZWebpageQ qdcZtypeQUqfnTypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZKnowledgeBaseContentQ qfnZtypeQUqfnTypeZE52esourceQ qfnZtypeQUqfnTypeZTechnicalSolutionQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfnTypeZCommunityContentQ qrdfZtypeQUqfnTypeZKnowledgeBaseContentQ qrdfZtypeQUqfnTypeZE52esourceQ qrdfZtypeQUqfnTypeZTechnicalSolutionQ qrdfZtypeQUqfnTypeZWebpageQ qrdfZtypeQUqfnTypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ