Add new menuitem to Send menu

Login to reply to this topic.
Thu, 2005-10-06 14:31
Joined: 2005-02-11
Forum posts: 214
I have to add new entry to other apps (like Gallery) Send menu, so my app
could do the sending. So far I have found only similar questions from
internet and no solutions? Any hints/samples/tips?

"I only know that I know nothing." (Socrates)


Thu, 2005-10-06 14:38
Joined: 2004-05-24
Forum posts: 982
Re: Add new menuitem to Send menu
If i understood right your question check for mtm.
You can find also an example on nokia site (textmtm is its name)

pirosl

Thu, 2005-10-06 14:46
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
This sample added new item to Messages "New message" menu

"I only know that I know nothing." (Socrates)

Thu, 2005-10-06 22:06
Joined: 2004-08-06
Forum posts: 57
Re: Add new menuitem to Send menu
The Send menu is populated by the MTM system. It asks every installed mtm if it supports the send functionality. only mtms which support it are listed in the send menu.

so you would need to create and register your own mtm. Then your mtmuidata.dll must support
the capability KUidMtmQuerySupportAttachmentsValue ( if i recall correctly) in MtmUiData::QueryCapability()

and then you eventually have to handle when the user actually selects your send entry

i don't think the textmtm examples implements these features, but it is a very good starting point (actually the only one...)


regards,

Blizzz


Thu, 2005-10-06 22:51
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
Thanks for a tip, will investigate....
Is this extra stuff documented also somewere?

"I only know that I know nothing." (Socrates)

Fri, 2005-10-07 11:27
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
I added this capability into my MTM (the TextMTM sample), but it isn't queried
This block is queried once:
    case KUidMtmQuerySupportedBodyValue:
    case KUidMtmQueryOffLineAllowedValue:
    case KUidMtmQueryCanReceiveMsgValue:
    case KUidMtmQueryCanCreateNewMsgValue:
and also
    case default: (where aCapability==0x10001378) - this one gets called a
lot

"I only know that I know nothing." (Socrates)

Fri, 2005-10-07 13:49
Joined: 2004-08-06
Forum posts: 57
Re: Add new menuitem to Send menu
how about KUidMtmQueryCanSendMsgValue? Please, try to add this one too.

I will look if i find anything else,

regards,

Blizzz
Fri, 2005-10-07 14:34
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
This one is actualy the 0x10001378 I got a lot. I sent response as True.
So the problem lies somewere else

"I only know that I know nothing." (Socrates)

Fri, 2005-10-07 14:58
Joined: 2004-08-06
Forum posts: 57
Re: Add new menuitem to Send menu
hmmm,
sorry i don't want to keep guessing here, but one more try Smiley

UIData::OperationSupportedL()

and in there a
case KMtmUiFunctionSendAs:
   return KErrNone;

or similar


if this doesn't do the trick, i will try to go back in my code and see what I did. at someone point i had my mtm showing up in the send menu, and then disabled it since i did not support this feature yet. maybe it was in a couple of spots... my memory goes down the drain...

which symbian platform are you targeting?

Blizzz




Fri, 2005-10-07 15:19
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
I have this code in OperationSupportedL
Code:
else if(aOperationId==KMtmUiFunctionSendAs || aOperationId==0x00203002 || aOperationId==0x00203003)
{ _LOGENTRY("Send Supported");
aReasonResourceId= 0; //is supported
}

But the main problem is that this function isn't called at all  Angry

"I only know that I know nothing." (Socrates)

Fri, 2005-10-07 15:34
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
I'm targeting it to Series 60 ver 8.0a

"I only know that I know nothing." (Socrates)

Fri, 2005-10-07 16:11
Joined: 2004-08-06
Forum posts: 57
Re: Add new menuitem to Send menu
hmm ok,

the following i tried out on the Series80 emulator:

my current mtm did not show up in the send menu.

Then in my UiData::QueryCapability function i added

switch (aCapability.iUid)
   {
case KUidMtmQueryCanSendMsgValue:            
case KUidMtmQuerySupportAttachmentsValue:   
aRespone = ETrue;
break;

...
...

return retVal  ( which is KErrNone in the above two cases)


then i tried it out. my mtm showed up in the send menu! ( i tried the documents/word application and the filemanager app)

here what happened when i opened the filemanager application and selected one file and then went to the send menu

my query capability was 3 times called with:

KUidMtmQuerySupportAttachmentsValue
KUidMtmQueryMaxBodySizeValue
KUidMtmQueryMaxTotalMsgSizeValue

before it displayed the send menu. OperationSupported() was not called at all.


so it works for me, not sure why you are having problems. maybe you have to restart the apps, maybe something is getting cached. or the problem lies somewhere else, I am not sure :-/



hope this helps...

Let me know what you find out

Blizzz











Fri, 2005-10-07 19:32
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
And you are using the Nokia textmtm sample as a basis?
I'm starting to suspect that something maybe wrong with my sample because even the New Message menu addon works very poorly

"I only know that I know nothing." (Socrates)

Mon, 2005-10-10 08:37
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
What sample are you using? The TextMTM sample doesn't compile in Series80 because of the Aikon classes. Did you modify it for your use or did you use something else?

In Series60 ver.8 emulator when I select Camera app, I get QueryCapability called once for KUidMtmQueryCanSendMsgValue.
For Messages app I get KUidMTMQueryCanCreateNewMsgValue (this is defined localy in mtm sample). No more, no less. New message entry is added to the menu but nothing to  Send menu.

CanCreateEntry is only one called when I try to open Camera app (this
supports Send menu).
When I open Messages then no CanXXX methods are called, but my command is
added to New Message menu.

Maybe some of my RSC files are mixed up or...

"I only know that I know nothing." (Socrates)

Mon, 2005-10-10 14:12
Joined: 2005-02-11
Forum posts: 214
Re: Add new menuitem to Send menu
YES!

Solved finaly.

TBool QueryCapability(...) wanted return value KErrNone !!!!!!!
I would like to meet some Symbian developer and kick him into .... Evil


"I only know that I know nothing." (Socrates)

Mon, 2005-10-10 20:50
Joined: 2004-08-06
Forum posts: 57
Re: Add new menuitem to Send menu
hey,
give him a good kick from me too please Smiley)

glad you figured it out!



Blizzz

  • Login to reply to this topic.