×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    SMS deletion (working in emulator not on device)

    I'm working on a S60 3rd edition project which involves deletion of a message as soon as it arrives in the inbox.

    I've called my function DeleteMessageL() which i call from the HandleSessionEventL() methods EMsvEntriesChanged case.

    It's working fine on the emulator (which i tested by the sms sending emulation feature in the utilities of the emulator). When i run it on the device however (N73, N91) it seems the function is never called... no alert dialog box or any panic or unhandled leave.

    void CSMSReceiver:eleteMessageL()
    {
    CMsvEntrySelection* entries;
    TMsvId entryId;
    CMsvEntry* entry = iSession->GetEntryL(KMsvGlobalInBoxIndexEntryId);
    CleanupStack::PushL(entry);
    entries=entry->ChildrenL();
    CleanupStack::PopAndDestroy(entry); // entry
    entryId=entries->At(0);
    CleanupStack::PushL(entry);
    entry=iSession->GetEntryL(entryId);
    TMsvEntry msvEntry = entry->Entry();
    entry->DeleteL(msvEntry.Id());
    CleanupStack::PopAndDestroy(entry); // entry
    delete entries;
    CEikonEnv::Static()->AlertWin(_L("Message received... and also deleted!!"));
    }
    Need help...

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: SMS deletion (working in emulator not on device)

    Have you added the necessary capabilities? You can check them in epocwind.out (http://wiki.forum.nokia.com/index.php/Epocwind.out)

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    Re: SMS deletion (working in emulator not on device)

    Quote Originally Posted by wizard_hu_ View Post
    Have you added the necessary capabilities? You can check them in epocwind.out (http://wiki.forum.nokia.com/index.php/Epocwind.out)
    Thanks wizard.. that was of great help indeed... the problem however remains ( although i now know the source)
    Earlier i only had a ReadUserData capability.
    I needed a writeuserdata capability as well. Added it to the mmp file, rebuilt,reconstructed the sis file, resigned it and reinstalled it... but this time also, during installation it only asked for confirmation regarding readuserdata capability. It asks the same even if i add no capabilities in my mmp file! I deleted all earlier sis files and started a fresh.. still it asks only Readuserdata capability...

  4. #4
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    Re: SMS deletion (working in emulator not on device)

    My guess is that no matter what capabilities you add, the installer knows which functions have been used needing capabilities.. and only asks for those. I came to this conclusion as when i added only WriteUserData capability to my mmp file... and commented out all of the messaging code, It never asked for any capability confirmations during installation.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: SMS deletion (working in emulator not on device)

    The installer does not know such things, the only thing it checks is the header of the executable, which is set in the .mmp file via the CAPABILITY keyword.
    Sometimes it can happen that your modifications in the .mmp file are not recognized/applied in the compilation process. You should try a combination of Clean+Build / removing and importing your project (if you use Carbide) / perhaps deleting the supplemental files in epoc32\BUILD\<path to your project> / and the output executables (.exe, .dll files in epoc32\release\gcce\urel) too.

  6. #6
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    Re: SMS deletion (working in emulator not on device)

    Quote Originally Posted by wizard_hu_ View Post
    The installer does not know such things, the only thing it checks is the header of the executable, which is set in the .mmp file via the CAPABILITY keyword.
    Sometimes it can happen that your modifications in the .mmp file are not recognized/applied in the compilation process. You should try a combination of Clean+Build / removing and importing your project (if you use Carbide) / perhaps deleting the supplemental files in epoc32\BUILD\<path to your project> / and the output executables (.exe, .dll files in epoc32\release\gcce\urel) too.
    Thanks wizard.. that worked. Im getting a confirmation of all the capabilities specified, but still the problem remains. The DeleteMessageL function is called, and the alert dialog displayed on the device as well, but the new message that arrived is not deleted. The same deletion however works on the emulator

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: SMS deletion (working in emulator not on device)

    If i remember it correctly then i think it is WriteUserData capability is needed for such an operation. Anyways you can get it confirmed using EPOCWIND.OUT approach.

    Anyways i have done the same thing for Sent Item messages in case with EMsvEntriesMoved .
    Check it here: Delete message from Sent Item ( Online Mode )

    Kiran.
    Nokia Developer Wiki Moderation team

  8. #8
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    Re: SMS deletion (working in emulator not on device)

    yep... i've added the WriteUserData capability... it also confirms for the same during installation. And the application does work in the emulator.. so i guess nothing wrong with the code, So why is'nt it working on the device?????

  9. #9
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: SMS deletion (working in emulator not on device)

    Quote Originally Posted by Puneet_Sharma View Post
    yep... i've added the WriteUserData capability... it also confirms for the same during installation. And the application does work in the emulator.. so i guess nothing wrong with the code, So why is'nt it working on the device?????
    Have you tried with changing the case to "EMsvEntriesMoved"?
    And which version of S60 3rd edition SDK you are building with?

    Kiran.
    Nokia Developer Wiki Moderation team

  10. #10
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    Re: SMS deletion (working in emulator not on device)

    Quote Originally Posted by kiran10182 View Post
    Have you tried with changing the case to "EMsvEntriesMoved"?
    And which version of S60 3rd edition SDK you are building with?

    Kiran.
    yes.. tried that as well... same result I'm workin on 3rd edition. (the first one.. before MR/FP i guess)

Similar Threads

  1. Replies: 2
    Last Post: 2007-11-10, 13:19
  2. Sending SMS immediately from Series60 device
    By ilkas in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-09-25, 19:57
  3. Sending SMS immediately from Series60 device
    By ilkas in forum General Messaging
    Replies: 0
    Last Post: 2002-08-18, 22:25
  4. Sending SMS immediately from Series60 device
    By ilkas in forum General Messaging
    Replies: 0
    Last Post: 2002-08-16, 13:31

Posting Permissions

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