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?
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...)
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
hmmm, sorry i don't want to keep guessing here, but one more try
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...
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 :-/
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
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.
Forum posts: 982
You can find also an example on nokia site (textmtm is its name)
pirosl
Forum posts: 214
"I only know that I know nothing." (Socrates)
Forum posts: 57
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
Forum posts: 214
Is this extra stuff documented also somewere?
"I only know that I know nothing." (Socrates)
Forum posts: 214
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)
Forum posts: 57
I will look if i find anything else,
regards,
Blizzz
Forum posts: 214
So the problem lies somewere else
"I only know that I know nothing." (Socrates)
Forum posts: 57
sorry i don't want to keep guessing here, but one more try
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
Forum posts: 214
{ _LOGENTRY("Send Supported");
aReasonResourceId= 0; //is supported
}
But the main problem is that this function isn't called at all
"I only know that I know nothing." (Socrates)
Forum posts: 214
"I only know that I know nothing." (Socrates)
Forum posts: 57
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
Forum posts: 214
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)
Forum posts: 214
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)
Forum posts: 214
Solved finaly.
TBool QueryCapability(...) wanted return value KErrNone !!!!!!!
I would like to meet some Symbian developer and kick him into ....
"I only know that I know nothing." (Socrates)
Forum posts: 57
give him a good kick from me too please
glad you figured it out!
Blizzz