×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    Launch Camera Application from Another App

    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!

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Beijing
    Posts
    3,609
    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.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    17

    Camera View Switching

    Hi all,

    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 ?

    Cheers
    Rod

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    128

    Can not run well!

    You example can not run well. Can you explain it more detail?

    Thanks.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    12
    This is how I implemented the code:

    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:

    TInt initialAppCount;
    TInt handle;
    TFileName AppToLaunch;

    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);

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    128
    It is done now. Thank you very much!

    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.

    Thanks again.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    12
    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.

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    128
    Thanks.
    Sorry that I want to know where can I get this document? If you have, Can you sent it to me. Thanks a lot.

    My e-mail is : changyongzhang@hostmind.com

  9. #9
    Registered User
    Join Date
    May 2003
    Location
    London
    Posts
    40
    http://ncsp.forum.nokia.com/download...Views_v1_0.pdf

    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.

  10. #10
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    260
    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.

    Eero
    Forum Nokia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×