×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    46

    KErrPermissionDenied with CRepository::get for camera settings

    Hello

    I was trying to detect which memory the camera is using, i was following this link :

    http://wiki.forum.nokia.com/index.ph...used_by_Camera

    however, with every CRepository::get, i get -46 (KErrPermissionDenied)

    is it because of my developer certificate ?

    Regards

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: KErrPermissionDenied with CRepository::get for camera settings

    Try adding Read & Write DeviceData capabilities to your app.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: KErrPermissionDenied with CRepository::get for camera settings

    KErrPermissionDenied is capability related error codes, means you are performing a operation but system does not give you you the permission, so you need to add related capability on your MMP file.

    For this add ReadDeviceData, and WriteDeviceData capability.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: KErrPermissionDenied with CRepository::get for camera settings

    According to Symbian^3's definition of the access policy (the only one I can easily access from outside the office) both those keys have an always pass policy for read access and require WriteDeviceData for write access. The Excel sheet in which this info is stored indicate that the data is valid since S60 5.0 so it is possible, although unlikely, that the policies to be different on earlier platform releases.

    If you are indeed getting this error at read you may want to try granting ReadDeviceData to your app, the most likely candidate. I will flag the technical solution as well so that symbianyucca can have a look and include the correct platform security policies in it.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  5. #5
    Registered User
    Join Date
    Jun 2009
    Posts
    46

    Re: KErrPermissionDenied with CRepository::get for camera settings

    Many thanks for the answers !

    my code is :
    const TUid KCRUidCamSettings = {0x101FFA86};
    CRepository* rep = CRepository::NewL(KCRUidCamSettings);

    TInt photo;
    TInt video;
    const TUint32 KCamCrPhotoMemInUse = 0x06;
    const TUint32 KCamCrVideoMemInUse = 0x16;
    TInt res1 = rep->Get(KCamCrPhotoMemInUse, photo);
    TInt res2 = rep->Get(KCamCrVideoMemInUse, video);

    I have added readDeviceData and writeDeviceData capabilities and signed my sis file online at https://www.symbiansigned.com/app/pa...ignedOnline.do

    Now i can not start my application, i get "feature not supported"

    i removed writedevicedata capability and left readdevicedata capability, still cannot start the application and i get "Feature not supported" , please note that i don’t have that code in the constructer, it is triggered by pressing a menu item. but still the application does not start at all

    Any ideas to why this is the problem ?
    Regards

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    46

    Re: KErrPermissionDenied with CRepository::get for camera settings

    Actually , what is causing "feature not supported" message when trying to open my application is platformenv.lib

    i need that library to get default video and picture folders, what is it not supported ,both N95 and E71 did not work


    after adding readdevicedata, CRepository::get is working fine, and i am getting 1 if phone memory is used and 2 if card is used.

    Regards

  7. #7
    Registered User
    Join Date
    Jun 2009
    Posts
    46

    Re: KErrPermissionDenied with CRepository::get for camera settings

    ok, found the problem

    i was compiling with S60 3rd FP2 and running on N95 and E71 which are S60 3rd PF1

    i only had this problem with platformenv.lib, not with the other libraries, but that makes sense because platformenv contains platform specific parameters


    with regards to ltomuta comment, i could not read camera repository untill i included readDeviceCapability.


    Many thanks for all your help !

    Best regards

Similar Threads

  1. SIP VoIP Settings Tool
    By petrosoi in forum VoIP
    Replies: 19
    Last Post: 2009-01-18, 05:23
  2. not possible to connect java-apps via Web/services proxy settings
    By helgobender in forum General Development Questions
    Replies: 12
    Last Post: 2009-01-07, 16:06
  3. New SIP settings without using settings -> sip settings
    By miikkis in forum Symbian Networking & Messaging (Closed)
    Replies: 20
    Last Post: 2008-11-20, 13:46
  4. Duplicate APN settings after OTA configuration (series60)
    By sidshaw in forum Smart Messaging
    Replies: 0
    Last Post: 2005-07-05, 14:04
  5. Problem sending GPRS settings
    By maronk in forum Smart Messaging
    Replies: 1
    Last Post: 2002-09-24, 06:28

Posting Permissions

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