×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    13

    Recognizer for start on boot

    Hi,
    I´m sure that most of the members of this board are fully packed on Symbian but there are some of us that are trying to start programming and even if we have experience in Visual C++ or Borland C++ we find it difficult to pass to Carbide c++.
    I found a lot of questions and answers related to recognizers and start on boot on this site but not one is oriented to the beginner developer. mdl files, recognizers, auto start API but not one of them start from the beginning.
    So I would ask you and hopefully someone will answer following some guidelines.

    [Carbide c++ express, S60 2nd edition 3FP]
    1. What type of project do I need to create in order to get a mdl file?
    2. What changes must be done to the configuration and configuration files?
    3. The code to be inserted, preferably with some explanations, in case changes to it can be made?
    4. Do you need to build it in a special way?
    5. Once build what do you do with it(add it to your project install it on the device etc)?
    6. If it must be incorporated into the app that will be started by it how do we do it?
    7. It is necesary to be an exact type of app or the *.app will do?
    8. Any special code that must be inserted into the application and where?

    or if we wish to use the Start On Boot API:
    1. Should we include the ExeStartOnBoot.lib?
    2. What else must be included?
    3. It works with *.app or it must be an *.exe?
    4. If it must be an *.exe how do we create one?

    I find it so simple to shoot questions away and I am sure that it´s difficult to answer to them but can someone try? At least that way the people will find the answer and wouldn´t start another start on boot thread.
    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Recognizer for start on boot

    1. What type of project do I need to create in order to get a mdl file?
    Well there is no specific project for the mdl (unfortunately) and from 3rd edition, we have different ways of doing it...
    However, you could start with creating a dll (mdl is basically a special library)

    example mmp file:
    target MyRec.MDL
    targettype MDL
    targetpath \system\recogs\

    uid 0x10003A19 0xMyUID

    SOURCEPATH .
    SOURCE MyRec.cpp

    LANG SC

    USERINCLUDE .

    SYSTEMINCLUDE \epoc32\include

    library EUSER.LIB APMIME.LIB efsrv.lib apparc.lib apgrfx.lib
    LIBRARY efile.lib


    Example Header file for mdl:


    #ifndef __MY_REC_H__
    #define __MY_REC_H__

    #include <apmrec.h>
    #include <apgcli.h>
    #include <f32file.h>
    #include <apacmdln.h>
    #include <e32std.h>
    #include <apmstd.h>

    class CMyRec : public CApaDataRecognizerType
    {
    public: // from CApaDataRecognizerType
    CMyRec();
    TDataType SupportedDataTypeL(TInt aIndex) const;
    static void StartProcess();
    static void StartProcessL();
    ~CMyRec();
    };

    #endif // __MY_REC_H__


    example source file:
    // MyRec.cpp
    #include "MyRec.h"

    const TUid KUidMyRec={0xMyUID};

    CMyRec::CMyRec()
    :CApaDataRecognizerType(KUidMyRec, CApaDataRecognizerType::ENormal)
    {
    iCountDataTypes = 1;
    }

    TDataType CMyRec::SupportedDataTypeL(TInt /*aIndex*/) const
    {
    return TDataType();
    }

    void CMyRec::StartProcess()
    {
    CTrapCleanup* cleanup = CTrapCleanup::New();
    if( cleanup == NULL )
    return;
    TRAPD( err, StartProcessL() );
    delete cleanup;
    }

    void CMyRec::StartProcessL()
    {
    // start my app or exe here....
    }

    EXPORT_C CApaDataRecognizerType* CreateRecognizer()
    {
    CApaDataRecognizerType* thing = new CMyRec();

    //start listener Process for My
    CMyRec::StartProcess();

    return thing;
    }

    CMyRec::~CMyRec()
    {
    #ifndef __WINS__
    //This will be called if the MDL file is deleted/replaced

    //Kill the process or app i started here.

    #endif // #ifndef __WINS__
    }

    #ifndef EKA2
    // DLL entry point
    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return KErrNone;
    }
    #endif // #ifndef EKA2






    Hope this will give you some help... now shoot ur other questions if u were unable to get this !
    Amit Kankani
    Nokia Developer Champion

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    13

    Re: Recognizer for start on boot

    Thanks for the code.

    The problem is that it compiles but is making a dll and not a mdl.

    I´ve started the project as a Basic dynamically linked library as this is the only one that doesn´t have a GUI. I have modified the mmp file in order to correspond with yours and put in the code. After I got it to compile I found out that it makes a dll. Where is the problem?

  4. #4
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Recognizer for start on boot

    in the mmp file, look at the line
    Target MyRec.mdl (here u wud have given MyMdl.dll)

    this cud be the reason...

    another reason cud be incorrect compilation..
    for that clean the build and recompile.
    To Clean the build go to the group folder and type the following:
    bldmake bldfiles
    abld reallyclean

    (i guess there is a clean option in Carbide too)

    gud luck
    Amit Kankani
    Nokia Developer Champion

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    13

    Re: Recognizer for start on boot

    Thanks, the clean option appeared to work. I couldn´t find a mdl in the release directory but I found a MyAutostart.mdl.map file. I looked in the lines generated by the buid option and it appears that it makes a dll and not a mdl. I´ve changed the type of target file from the project´s properties dialog but it gives me an error. Any ideas?

    P.S. The mmp does specify a MDL target and MyAutostart.MDL.

  6. #6
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Recognizer for start on boot

    well seems difficult to relate...
    how do you open the workspace... try importing from mmp file... and try...

    else u got to mail me the code and may be i can check easily....

    if u ready to mail... then pass ur mail id here and i shall reply to that...
    Amit Kankani
    Nokia Developer Champion

  7. #7
    Registered User
    Join Date
    Dec 2006
    Posts
    13

    Re: Recognizer for start on boot

    The mail would be marius@decebalus.es.

    The workspace is opened automatically by carbide.

  8. #8
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Recognizer for start on boot

    hey have mailed you the code back with some minor changes...

    guess it will get going now
    Amit Kankani
    Nokia Developer Champion

  9. #9
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    80

    Re: Recognizer for start on boot

    Hi Amit Kankani,

    Quote Originally Posted by amitkankani View Post
    Well there is no specific project for the mdl (unfortunately) and from 3rd edition, we have different ways of doing it...
    Could you elaborate this a little further? I mean which ways are there for 3rd edition - except from Startup List Management API?

    TIA
    Judith

  10. #10
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Recognizer for start on boot

    Startup List Management API is the ONLY way of Start on Boot in S60 v3x

  11. #11
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    80

    Re: Recognizer for start on boot

    Allright thanks - no need to start yelling. I understand that nokia does not like any other approaches of auto starting stuff...

    ...however does the Startup List Management API offer the possibility to start anything before the pin-screen appears?

    Is there any way to achieve this with Symbian OS v9.x?

    Thanks
    Judith

Similar Threads

  1. Recognizer & MIME registration
    By botvinik in forum Symbian C++
    Replies: 7
    Last Post: 2006-05-03, 09:00
  2. Strange Phone Reboot Problem: Recognizer???
    By arizkohli in forum Symbian C++
    Replies: 2
    Last Post: 2004-09-06, 08:55
  3. Recognizer on Nokia6600
    By armel in forum Symbian C++
    Replies: 1
    Last Post: 2004-03-03, 16:13
  4. Should recognizer launch a thread or app?
    By jhnlmn in forum Symbian C++
    Replies: 0
    Last Post: 2003-10-08, 21:04
  5. How to start a recognizer programmatically?
    By jhnlmn in forum Symbian C++
    Replies: 0
    Last Post: 2003-10-08, 20:55

Posting Permissions

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