Recognizer.

Login to reply to this topic.
Mon, 2005-04-25 06:42
Joined: 2004-09-06
Forum posts: 235
I have written a recognizer that identifies my file extensions. But when I
click on the particular message in the inbox, only the SupportedDataTypeL()
and PreferredBufSize() functions get called. DoRecognizeL()does not get
called. Instead the attachment is opened by the "Notes" application. Do I
have to override the RecognizeL() function also and explicity call
DoRecognizeL()?
I am refering to the link:
http://www.cs.helsinki.fi/u/mraento/symbian/autostart.html

Regards,
Vink

Tue, 2005-04-26 10:34
Joined: 2004-12-30
Forum posts: 33
same problem !!!
Hi vink,

May I know the phone u r using..As I am doing this on Series 60(N 6600) and I am also facing the same problem.If you find out any solution for this pls notify me also as I am also having the same problem with the attachment...

Thanks,
Jagadish.
Tue, 2005-04-26 11:49
Forum Nokia Champion
Joined: 2003-10-01
Forum posts: 723
Recognizer.
And what is the file extension you're trying to resolve? Because it might happen that Messaging application uses Document Handler (I'm talking about Series 60) in order to find the appropriate handling application for MIME-types. In this case, Document Handler first checks if there are internal handlers that are capable of resolving the extension. If there is such a handler, then it will not use recognizer framework at all. Otherwise (if there isn't such a handler), it uses the recog fw, in which case I'm unsure why you're DoRecognizeL function is not called.

tOtE

Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/

Wed, 2005-04-27 02:34
Joined: 2004-09-06
Forum posts: 235
Recognizer.
Hello,
       I am trying this on Nokia 6600. Is this a problem in only N6600?
I tried the following MIME types
text/vnd.newlc.zzz and application/vnd.xxx.
This doesn't work.

//My mmp file is...
TARGET      recog.mdl
TARGETTYPE  mdl
TARGETPATH  \system\recogs

UID         0x10003A19 0x10005C2B
USERINCLUDE   ..\inc
SYSTEMINCLUDE \epoc32\include

SOURCEPATH    ..\src
SOURCE        recog.cpp

LIBRARY       euser.lib
LIBRARY       apmime.lib apparc.lib apgrfx.lib
LIBRARY       efsrv.lib estor.lib

and in pkg
"\...\group\10005C2B.ini"-"!:\system\SharedData\10005C2B.ini"
"\Symbian\7.0s\Series60_v20_CW\Epoc32\release\armi\urel\recog.mdl" -"!:\system\recogs\pdbrecog.mdl"

10005C2B.ini file
SDDataDir=c:\system\Apps\XYZ\XYZApp.app
Wed, 2005-04-27 06:08
Joined: 2004-09-06
Forum posts: 235
Recognizer.
Well I tested the same code on 7610, but could not run it. I think the problem is with the code. I am doing all as given in the document handler pdf.
  After many tries, my DoRecognizeL() got called. But now the handset hangs and when I open FileExplorer it throws
View Srv 11 or AppArcThread read 11 and my app gets opened.

Also tried this link.
http://www.forum.nokia.com/main/0,,1_32_30,00.html

Can I make an entry in the inbox of the emulator with the file attachment. So that this helps debugging.

Can anyone pass any working code snippet for this?
Wed, 2005-04-27 08:32
Forum Nokia Champion
Joined: 2003-10-01
Forum posts: 723
Recognizer.
Quote from: Vinay
I am doing all as given in the document handler pdf.

Well, it might have nothing to do with the use of DocHandler.

Quote from: Vinay
After many tries, my DoRecognizeL() got called. But now the handset hangs and when I open FileExplorer it throws
View Srv 11 or AppArcThread read 11 and my app gets opened.

First, what did you do that finally fixed your problem?

Second, View Srv 11 is a panic that occurs, when an application is activated (brought to foreground), but is doing such an intensive work that it cannot respond to the system. Then the UI framework waits until ~10 seconds and finally gives up and throws a ViewServer 11 panic.

Finally, what I'm missing from your package file is an AIF file for your application, which tells the Application Architecture, which MIME-types your application is interested in. Without that file, I'd be very surprised how on Earth the system could find your app.

Cheers,

tOtE

Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/

Wed, 2005-04-27 10:58
Joined: 2004-09-06
Forum posts: 235
Recognizer.
The aif file is supposed to be with my application handler and not the recognizer dll, right? so it will go within my firm application pkg.
Correct me if I am wrong.

Also I have overriden the OpenFileL() method of my app document.
regards,
Vink
Wed, 2005-04-27 13:30
Forum Nokia Champion
Joined: 2003-10-01
Forum posts: 723
Recognizer.
Right, the AIF file belongs to your app. I asked this question, because I saw an application in your package file so I thought that you deploy it in the same SIS file.

tOtE

Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/

Wed, 2005-04-27 13:33
Joined: 2004-09-06
Forum posts: 235
Recognizer.
I noticed that if I put plain text in my file to be recognized, the notes application gets called. But when I put some binary data in it says "Unknown File Format".
But in this case also DoRecognizeL() is called. I think the problem is with the invoking of my app.
I have the ini file with the mdl dll UID in unicode. Everything seems according to the doc handler document.
Wed, 2005-04-27 13:35
Joined: 2004-09-06
Forum posts: 235
Recognizer.
Ya... I will eventually deploy it in same sis. But let me get it working standalone first.
Fri, 2005-04-29 02:41
Joined: 2004-09-06
Forum posts: 235
Recognizer.
Hello,
        I was able to get it run and tested it on 7610. The application opens now and everything works smoothly and OpenFileL() of my application gets called.
But now I want my application to perform some different task on the file click. So I put a flag in my document and set it in the OpenFileL() functoin. But I noticed immediately that the flag value does not get reflected in the application. Instead a fresh new object of document with my flag set to 0 is found. Do I need to call other function to copy my document object to the application?

REgards,
Vink
Fri, 2005-04-29 09:51
Forum Nokia Champion
Joined: 2003-10-01
Forum posts: 723
Recognizer.
Hi,

I'm completely lost: which application uses your recog? Which application gets launched as a result of recognition?

tOtE

Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/

Fri, 2005-04-29 10:09
Joined: 2004-09-06
Forum posts: 235
Recognizer.
This is the definition of my OpenFileL() method,
CFileStore* CQwtDocument::OpenFileL (TBool doOpen, const TDesC& filename, RFs& fs)
{
 CFileStore* result = CAknDocument::OpenFileL (doOpen, filename, fs);
 MyFileWriteL(filename, _L("\\system\\apps\\qwt\\openDoc.txt"));
 iMyMode = 2;
 iFilename.Copy(filename);
 return result;
}

Now when my application gets opened I make a check if the iMyMode flag is set to 2. This is done inside the constructor of my AppUi.

CXmsDocument* document =  static_cast<CXmsDocument*>(Document());
TMsvId id = document->Id();    
TInt docMode = document->Mode();

the value returned by the document->Mode() does not return 2. Also the iFileName does not reflect the name of the clicked file.

\\system\\apps\\qwt\\openDoc.txt gets created and contains the full path of the clicked file.(i.e from the inbox).
Fri, 2005-04-29 10:13
Joined: 2004-09-06
Forum posts: 235
Recognizer.
Atleast the application get invoked in 7610. But when I install the recognizer on Nokia 6600 (firmvare version 5.27.0 28-06-04 NHL-10), the installer gives a problem saying
App. closed AppArcServerThread. and then the handset hangs. ( same problem occurs on 3660) I noticed that there is no recogs folder in the c:\system\ directory. So I manually created it usinf FileExplorer.
Still the problem persists.
My hadset hangs and I am not able to open any application.

I have seen many post regarding the recognizer problem on Nokia 6600, but could not find any solution there.
Has anyone been successful in writing a recognizer on Nokia 6600.
Any help is highly appriciated.

regards,
Vink
Fri, 2005-04-29 11:36
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Recognizer.
I have no problem with this recognizer on my 6600 (firmware 3.42.1  16-10-03).


If you are not sure of your recognizer, don't try to install it on C:. Work on the MMC card instead.

Could you explain what files you try to install on the phone (and where)? Are you just using the recognizer to recognize a file type or are you also doing other stuff (like booting your app) ?

Quote
Now when my application gets opened I make a check if the iMyMode flag is set to 2. This is done inside the constructor of my AppUi.

CXmsDocument* document = static_cast<CXmsDocument*>(Document());
TMsvId id = document->Id();
TInt docMode = document->Mode();

the value returned by the document->Mode() does not return 2. Also the iFileName does not reflect the name of the clicked file.
The AppUi constructor is called before OpenDocumentL.

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Fri, 2005-04-29 13:09
Joined: 2004-09-06
Forum posts: 235
Recognizer.
Well, I've solved the problem. The mistake I was doing was that the name of my recognizer was more that 16 characters. The word "recognizer" itself is 10 characters and ".MDL" consume another 4 characters. My recognizers name was XmsRecognizer.MDL. The recognizers name should not be more than 16 characters including the .mdl extension.

>>The AppUi constructor is called before OpenDocumentL.

I want to change the flow of my program depending on whether my application was invoked on file click or from Application Menu.
I set the default view in the ConstructL() of my appUi. I want to select the view here. Any ways to do this?
  • Login to reply to this topic.