I would like to launch the camera application for the Series 60 from within an application I have written. However, I do not know the path or the application name for the camera. Does anyone know what it is?
I have written similar applications on the Series 80 in which I can launch a specific application from my app by simply specifying the path and application name to open. Is this possible with the Series 60? Thanks for your help!
You may switch view to a camera view in your application to activate the camera application.
To switch to a view within your application, you can use the AppUi class method ActivateLocalViewL(). The parameter for ActivateLocalViewL () is a TUid.
The following is an example of view switching:
const TUid KDemo1ViewId = { 1 }; // UID of the first view
ActivateLocalViewL(KDemo1ViewId); // activate view 1
Camera Application
Application Uid: 0x1000593F
View Uids:
0x01 // standby mode
0x02 // viewfinder mode
0x04 // Name base, and Quality settings
None of the views takes Message Uids or messages.
Once I switch from my application to the camera view application to take a snapshot and return back to my application, how can I get the information about the snapshot file taken ?
Is there a way to receive back some details from the camera app ?
Inside class derived from CAknView:
TVwsViewId targetView(TUid::Uid(AppUid), TUid::Uid(ViewUid));
ActivateViewL(targetView);
AppUid and ViewUid are specified in my resource file. You could have put the UID's anywhere. AppUid is the camera application UID (0x1000593F). ViewUid (0x02) is the mode I want to display for the camera, ie standard, view finder, etc.
When this function is called, it will open the camera view in the specfied mode.
This way is a little different than the code above but it does work and is simple.
You could also launch the application using the path:
CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
cmdLine->SetLibraryNameL(AppToLaunch); //path of application - z:\system\apps\camera\camera.app - this path will only work on the device
cmdLine->SetCommandL(EApaCommandOpen);
RApaLsSession ls;
User::LeaveIfError(ls.Connect());
handle = ls.Handle();
ls.EmbeddableAppCount(initialAppCount);
CleanupClosePushL(ls);
User::LeaveIfError(ls.StartApp(*cmdLine));
CleanupStack::PopAndDestroy(2);
But one more question is : How can I get the Data when the camera take phote? It is mean that: How can I get the photo through my application, Not through the Photo Club in the Nokia Phone.
FYI - There is a document called "Utilizing External Application Views v1.0" in the Symbian documentation on the Nokia web site that has some useful information on switching between applications as well as several of the application UID's and View UID's for Series 60 devices.
Allthough it only describes how to call/start another applications view, and it lists the useful UIDs, it doesn't tell you how to get the data back from the view you just called, ie to get the photo that was created.
A liltle trick i did was the search the possible image dirs for the last created file date and use that. As far as i know there is no way to get information back from a view that has just deactivated.
When a view is activated, one of the parameters in the doactivatel() is the previous view. So, when exiting you could send a message to the previous view. However, I found that very few system applications do that. Actually I haven't found any. They have other means of communicating information back, for instance using servers.