Recognizer.
| Mon, 2005-04-25 06:42 | |
|
|
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 |






Forum posts: 33
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.
Forum posts: 723
tOtE
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 235
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
Forum posts: 235
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?
Forum posts: 723
Well, it might have nothing to do with the use of DocHandler.
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/
Forum posts: 235
Correct me if I am wrong.
Also I have overriden the OpenFileL() method of my app document.
regards,
Vink
Forum posts: 723
tOtE
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 235
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.
Forum posts: 235
Forum posts: 235
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
Forum posts: 723
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/
Forum posts: 235
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).
Forum posts: 235
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
Forum posts: 2006
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) ?
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.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 235
>>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?