How to embeded camera application in my program?help me,please

Login to reply to this topic.
Tue, 2008-06-17 06:12
Joined: 2008-04-27
Forum posts: 15

in my program,i want to embeded the camera application,i do it like below,in other place i call the OpenCamera() function.

TBool CLaunchCamera::OpenCamera()

{

if( m_pEikonEnv == NULL )
return FALSE ;

TApaAppInfo appInfo;

if( FindCamera( appInfo) == FALSE )
return FALSE ;

m_pProcess = m_pEikonEnv->Process();

TApaApplicationFactory aFactory(appInfo.iUid);

m_pAppdoc = m_pProcess->AddNewDocumentL(aFactory); //-------------here is the problem!,which show me "system error -1"

ASSERT( m_pAppdoc != NULL ) ;

TApaDocCleanupItem cleanup(m_pProcess, m_pAppdoc);

CleanupStack::PushL(cleanup);

m_pAppdoc->NewDocumentL();

CleanupStack::Pop(); // cleanup

m_bCloseCamera = FALSE ;

m_pAppdoc->EditL(this, EFalse );

return TRUE ;

}

but the problem is that when i run the program,it shows "system error -1",the problem lies in m_pAppdoc = m_pProcess->AddNewDocumentL(aFactory);

so,can anybody help me?what's the problem??tks in advance!


Tue, 2008-06-17 09:21
Joined: 2008-04-27
Forum posts: 15
Re: How to embeded camera application in my program?help me,plea

why nobody??

Tue, 2008-06-17 10:07
Joined: 2007-11-16
Forum posts: 32
Re: How to embeded camera application in my program?help me,plea

Try this buddy

http://wiki.forum.nokia.com/index.php/TSS000037_-_Embedded_camera_view_in_an_application

Pramod


"Nobody will believe in you unless you believe in yourself."

Tue, 2008-06-17 11:03
Joined: 2008-04-27
Forum posts: 15
Re: How to embeded camera application in my program?help me,plea

tks,pramod.
i forgot to tell you that i use the 3rd edition platform.in the 2nd edition,i am able to realize it like below:

m_pAppdoc = m_pProcess->AddNewDocumentL(appInfo.iFullName, appInfo.iUid);

but now,i want to realize it on the 3rd edition platform.when i try it as i have figured out above,it shows me "system error -1".i don't know why,can anyone help me to find the problem in my code?my code is like this:

TApaApplicationFactory aFactory(appInfo.iUid);

m_pAppdoc = m_pProcess->AddNewDocumentL(aFactory); //-------------here is the problem!,which show me "system error -1"

tks!

  • Login to reply to this topic.