Embedded camera view in a Symbian C++ app

From Nokia Developer 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}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (04 Mar 2003)
Last edited: lpvalente (20 Jul 2014)


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


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.


void MyApplication::NewImage()
const TUid KUidCamera = { 0x1000593F };
RApaLsSession apaLs;
TApaAppInfo appInfo;
CApaDocument* doc = NULL;
CEikProcess* process = CEikonEnv::Static()->Process();
User::LeaveIfError(apaLs.GetAppInfo(appInfo, KUidCamera));
doc = process->AddNewDocumentL(appInfo.iCaption, KUidCamera);
CleanupStack::PopAndDestroy(); // apaLs
TApaDocCleanupItem cleanup(process, doc);
CleanupStack::Pop(); // cleanup
doc->EditL(this, ETrue);
void MyApplication::NotifyExit(TExitMode aMode)
// camera view has been closed
This page was last modified on 20 July 2014, at 19:10.
53 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.