Read Bt attachment problem in 3rd edition phone

Login to reply to this topic.
Wed, 2006-03-01 11:27
Joined: 2006-01-25
Forum posts: 24
I use AttachmentManagerL to query filename of attachment, and the code is shown as below. It works for getting MMS attachment. However, if the message type is KUidMsgTypeBt, it cases KERN-EXEC 3 when calling ReadStoreL, what wrong in the code? Besdies, I also found that if message type is KUidMsgTypeBt, entry->Entry().Attachment() will return EFalse. Why???

I worry CMsvStore not support for Bt message and cannot get the attachment by message store, then I need to apply AllFiles permission to read the attachment by file path Sad


CMsvEntry* inboxContext = iMsvSession->GetEntryL( KMsvGlobalInBoxIndexEntryId );
CleanupStack::PushL( inboxContext );

CMsvEntrySelection* entries = inboxContext->ChildrenL();
CleanupStack::PushL( entries );
for (TInt i=0; i<entries->Count(); i++)
{
  CMsvEntry* entry = iMsvSession->GetEntryL((*entries)[i]);
  CleanupStack::PushL(entry);
  CMsvStore* inboxStore=NULL;
  inboxStore = entry->ReadStoreL();
  CleanupStack::PushL(inboxStore);
  for (TInt k=0;k<inboxStore->AttachmentManagerL().AttachmentCount();k++)
 {
    CMsvAttachment* att =inboxStore->AttachmentManagerL().GetAttachmentInfoL(k);
    fileArray->AppendL(att->AttachmentName());
    delete att;
  }
  CleanupStack::PopAndDestroy(inboxStore);
  CleanupStack::PopAndDestroy(entry);
}

CleanupStack::PopAndDestroy(2,inboxContext);

Thu, 2006-03-02 03:16
Joined: 2006-01-25
Forum posts: 24
Re: Read Bt attachment problem in 3rd edition phone
Finally, I found that if using   CMsvEntry* entry = iMsvSession->GetEntryL(id) to get the Bt Message, this entry has no store i.e. entry->HasStoreL() return EFalse.  That's why entry->Entry().Attachment() return EFalse and ReadStoreL will dead.

Is it mean that cannot use message store to get the attachment from Bt message?  Direct read the Bt message attached from mail folder is the only method? If yes, it cause the AllFiles permission problem in 3rd edition phone.

Anyone has comment?
Thu, 2006-03-02 05:41
Joined: 2005-11-18
Forum posts: 71
Re: Read Bt attachment problem in 3rd edition phone
Thanks !!
whade
to send the answer, it help me to read attachments.

JKS
Tue, 2006-05-16 15:24
Joined: 2005-11-16
Forum posts: 63
Re: Read Bt attachment problem in 3rd edition phone
I have the same problem ... seems there is no solution.
  • Login to reply to this topic.