×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Exclamation Introduction to MTM

    Hi all,

    Project Overview:
    I try to develop an music uploader which should talk to a server (XBox), in order to play songs having on the phone through my stereo. So far so good I implemented an HTTP based protocol which talks with a servlet on my server. I scan all folders for music and upload it to my xbox.

    My Problem:
    Now I want to implement an MTM which "simply" extends the fileexplorer send menu. I like to have an option eg. "Send->to XBox". Therefore I studied the TxtMTM example provided on the nokia side, but even after 2 weeks I cannot get into the stuff properly. Also I read capter 9 in Symbian OS Communications Book where they discuss an example very similar to my problem (Flickr MTM) unfortunally I cant find the source code for that example, and in the book in my opinion they miss a couple of stuff.

    The question:
    Can anyone provide some basic overview, I mean where should I start to look at. The TxtExample seems to provide what I need but i cant get it. I promiss if I manage to get the stuff run, I'll write an article about it in the wiki or here, to prevent this kind of newbie questions
    Also all other examples are welcome, maybe someone already has the same problem and could help.

    Thanks in advance
    Sirius

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: Introduction to MTM

    Hi,

    you are free to post some questions to rene@inmote.com. I cannot promise if I can answer all questions, but I am currently working on a MTM (it runs on several phones and on the S60 3.0 MR emulator). I used TxtExample too as a starting point - the quality of the example and associated documentation is (I agree) a bit poor. We had to find out a lot (and really a lot) ourselves.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Re: Introduction to MTM

    Quote Originally Posted by Sirius81 View Post

    The question:
    Can anyone provide some basic overview, I mean where should I start to look at. The TxtExample seems to provide what I need but i cant get it. I promiss if I manage to get the stuff run, I'll write an article about it in the wiki or here, to prevent this kind of newbie questions
    Also all other examples are welcome, maybe someone already has the same problem and could help.
    If you ask some specific questions then it would be easy to help you. What do you want to know? And how much you already know regarding MTM?

    You can learn for APIs description in SDK help also.
    Nokia Developer Wiki Moderation team

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: Introduction to MTM

    I posted some really specific questions on MTM in this forum. Mostly they remain unanswered as no one really seems to know a good answer. Feel free to have a look. Just search the post with user name "heuven".

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Re: Introduction to MTM

    Quote Originally Posted by heuven View Post
    I posted some really specific questions on MTM in this forum. Mostly they remain unanswered as no one really seems to know a good answer. Feel free to have a look. Just search the post with user name "heuven".

    BR,

    Rene
    Then answer them here so that everybody can know. So that it doesn't remain intact in your mailbox only. Let's wait for "Sirius81" questions.
    Nokia Developer Wiki Moderation team

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Introduction to MTM

    Hello now I atleast know that I'm not alone

    Basically I'm a bit lost in the example I first tried to set breakpoints into each function to see how everything interacts, then I quickly saw that a lot of code isnt necessary for my problem. The next step was to copy the needed classes (server, Ui , Ui Data, Client) into a new project. But then for sure nothing worked anymore. Mainly I got KERN-EXEC 3 after QueryCapabilities was called. In the emulator I clicked the Optionbutton->Send. For sure the best thing would be if someone could provide a really simplified sample implementation, which in your case maybe isnt possible cause you earn your money with that Anyway at the moment I'm not at home and I'll return on monday, then I could paste here my code, and hope we could discuss it a bit more in detail. Also the complete flow isnt clear to me at this point, I basically know how the classes interact but in general I'm a bit lost

    @Rene: Thank you very much for your invitation to write you a mail but I agree with kiran, to leave the discussion here in the forum. For sure, if you dont want to paste here some sample code, I'll come back to your offer I also read your posts here and didnt find a proper solution to my problems. Mainly cause nobody answered, as you mentioned.
    Also a lot of other issues where mentioned here: eg. if you try to use LinkedAttachment(), which I definitly have to, because making a copy of my music files doesnt seem a good solution for me.
    My goal is to get this entry in the send menu and then use my IPC class to send the filename of the track to my main application.

    Finally I want to thank you for your swift responses I haven't expect someone answering to this post, as I saw your posts in the past.

    Best regards and I post back here on monday.
    Last edited by Sirius81; 2008-10-04 at 19:29.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: Introduction to MTM

    It is not my intention that the knowledge should not be shared. However as you describe your problems, it seems more like you are having multiple problems and are a bit lost in the TextExample MTM. I think such issues are more easily discussed in email. In fact I do not have a simple MTM framework currently available, although it would be interesting to have such a simple MTM framework for projects and training.

    Maybe a little advise is welcome here. I would recommend to put as little functionality as possible in the MTMs. MTMs can just call out to other SW components (DLLs etc) and there is no need to put any data in the message store/database. MTMs are highly complex. So you do not want to get too deep in this technology. Also the slightest change may make a MTM work no longer or it turns out functionality can be not be programmed the way you expected. Most programmers expect they can write a customized mailbox using a MTM. This is not the case. The message center application dictates how your mailbox looks like and there is only very little space to customize such a mailbox using a MTM. Also you do not have full control over the Options menu.

    Actually I could even state the MTM framework and Message Center Application is not fit for purpose in the current S60 environment where the market demands a highly customized and sophiticated messaging application (video, music sharing with scalable and customized 3D / touchscreen UIs).

    Only if you want your own mailbox you to store entries in the message store/database. If you only want "Send As" functionality you can create an MTM and call out to other SW components like an GUI application or DLL from within the client MTM.

    In general I would recommend: keep the MTM simple, put as much functionality as possible in other SW components and have the MTM invoke this functionality where appropriate.

    For KERN-EXEC 3: this sounds like a normal pointer problem. A member variable which does not get initialized or something like that.

    I am developing my MTM in S60 3rd MR SDK and S60 3rd FP2 SDK. Stories that MTMs are not compatible between different S60 platforms are just a myth. I am compiling my MTM for 6220 Classic (S60 3rd FP2 device) just using S60 3rd MR SDK and this works fine. Otherway around using S60 3rd FP2 SDK for compiling the same MTM for N95 (S60 3rd FP1 device) I am not sure and I did not test this yet.

    Hope this gives you confidence!

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  8. #8
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Introduction to MTM

    Hello Sirius,
    about the source code of the examples in the Symbian OS Communications Programming book, maybe you can find something here:
    http://developer.symbian.com/main/do...omms/index.jsp

    look at Related Resources in the bottom right part of the page

    hope it helps,
    pg

  9. #9
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: Introduction to MTM

    Hi pavarang,

    I also have looked at that location. It contains source code, but not for the MTM they do discuss in the book. I even have written on email to Wiley. Never got any response.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  10. #10
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Introduction to MTM

    I also wrote them but they answered that the sample is not published since it requires heavy capabilities.
    I told him my email adress maybe I'll recieve the sample, then for sure I'll share it, but I dont want to wait, cause I dont think it will happen.

    Actually I'm facing some problems:
    1. Which components I definitly have to implement? I read that UI,UiData,CLient and Server is needed in every MTM. As Rene mentioned I dont want to store anything into a Mailbox/Store etc. So why I need the server component? I already tried to remove it but then I always get some panics that MsgServer is missing.
    2. Howto create an own entry in the Sendmenu. I already modified my UiData.rss file

    Code:
    RESOURCE MTUD_FUNCTION_ARRAY r_textud_function_array
    	{
    	functions=
    		{MTUD_FUNCTION { functiontext="to XBox";
    		command=KMtmUiFunctionSendAs; flags=EMtudCommandSendAs;}
    		};
    	}
    and also implemented the loading mechanism into UiData's GetResourceFileName but the method is never invoked.
    3. Program crashes directly after the first call of QueryCapability (called with KUidMtmQueryCanSendMsgValue) return value KErrNone. I do not really know what is called afterwards, I put breakpoints into each function.
    The flow looks for me like this:
    After Install: Client::NewL(), Client:Client(), ConstructL(), ~Client()

    If I click on options: UiData::NewL() construction..., QueryCapability -> Kern-Exec3

    I think that I miss to call or override some function, any ideas?

    Hope anyone can help.

    Best regards
    Chris.

  11. #11
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Introduction to MTM

    Ok, since nobody is answering so far, I moved back to the working TextMTM example. Now I modified my rss files and the QueryCapability method properly and I can see the 'to Xbox' entry in the sendmenu. Also the editor included in the example is opened and doing the normal TextMTM stuff.

    I followed the code and recognized that I atleast have to modify the editor which is basically arranged in Viewer folder, so that it fits to my needs.

    At the moment I'm looking for the position where I could read out the filename, of the item I selected before in the Filemanager. Does anyone know how I could achieve this?
    Another issue is that I have to limit the appearence of the 'to Xbox' entry for certain files (*.mp3) maybe someone has already experience with it? I think that this should be done in OperationSupportedL() but I really don't know how.

    Thanks in advance
    Chris

  12. #12
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: Introduction to MTM

    Hi Chris,

    1. It is impossible to have a MTM with no server MTM as far as I know. An MTM always contains four DLLs: server MTM, UI MTM, client MTM and UI Data MTM (this has historical reasons).

    2. GetResourceFileName from UI Data MTM should be called. Put a breakpoint in NewMtmUiDataLayerL and step through the code line by line until you see that construction has been completely succesfully for the MTM UI Data object (ensure no leave oocurs during this process - the message applications somehow ignores your MTM if the construction fails and will also not call other methods in your MTM if construction fails).

    3. I do not see a problem with the definition of your RESOURCE MTUD_FUNCTION_ARRAY.

    4. CMtmUiData::OperationSupportedL is called whenever the Options menu is opened (presumably also when the Send As submenu is opened?). I ORed EMtudContextSpecific with EMtudCommandSendAs in the MTUD_FUNCTION_ARRAY. Maybe that makes a difference. You may have to experiment a bit here (that's why I asked source code/email exchange - now I can only speculate). I made a note that if no entries are in the mailbox CMtmUiData::OperationSupportedL will never be called.

    5. Do you have specified that your MTM has Send capability in MTM_CAPABILITIES?

    6. Good you are back in a working situation. Which SDK are you using?

    7. I would also say OperationSupportedL is to right place to filter/check. Are you checking for KMtmUiMceWriteMessageSubmenu?

    8. For your own command IDs it is important to start the enumaration TTxtuCommandIds at 1 otherwise OperationSupportedL() is not called.

    9. A bit unclear to me is how your could know which *.mp3 would be currently selected in the file browser. They must have the same problem in the Flickr MTM.

    Also send you some wishes for good fortune. Hope you make some progress.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  13. #13
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Introduction to MTM

    Hi Rene, thanks for your suggestions.

    1. I also already suggested that
    2. Since I use the nokia sample I have no problems with Construction
    3. agree
    4. I will experiment a bit with that parameter, in the SDK they write: Operation requires that the context is set to the relevant entry before calling. But where do I set this context?
    5. Yes, I specify send & body capabilities
    6. Currently I'm debugging in S60 3rd MR, but my target is to support MR, FP1 & 2. Btw. I recognized that the emulators behave differently, eg.: when I debug FP2 I don't arrive my breakpoints in QueryCapability when I enter the SendMenu, its actually done before - after installation once, thats why I basically use the MR Emulator
    7/8. No, actually I'm using the implementation of the nokia sample but commented out the TPlatformMtmUiCmds and use the standard txtucmds.hrh. As I see in the example they start the enumeration with: KMtmUiFirstPlatformMTMFunctionId should be safe then. Could a check against KMtmUiMceWriteMessageSubmenu be necessary? At the moment I even don't know what it is?

    9. Hm, in the book they say something like: we return KErrNotSupported if its not a jpg. But the miss to tell where they check and how. Maybe I get the example which would help me a lot, but I dont want to rely on that.

    Last but not least thanks a lot for your wishes, I definitly need them

    BR
    Chris.

  14. #14
    Nokia Developer Expert
    Join Date
    Jun 2008
    Posts
    333

    Re: Introduction to MTM

    one thing need to be noticed, some e-serial phone,eg,E70 and E60,maybe have problems to use customer MTM plug-in.
    Last edited by lming; 2008-10-10 at 13:22.

Similar Threads

  1. KErrNotSupported when creating a folder on a Third party MTM
    By Richelieu in forum General Messaging
    Replies: 1
    Last Post: 2009-03-16, 13:43
  2. MTM: trying to create subfolder structures
    By blizzz in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-05-06, 18:17
  3. MTM registering fails on certain rom versions (s60 3rd)
    By blizzz in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-05-22, 16:52
  4. want to show mtm editor
    By jugnoyasir in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-10-01, 07:06
  5. Problem installing MTM
    By LMVERB in forum Symbian
    Replies: 1
    Last Post: 2005-09-14, 04:58

Posting Permissions

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