05-07-2011 06:58 AM
i am working on a backberry application and my application is basically a search type application.
i have started of with the simplest way possible. i put many text files (.txt) in diffrent folders in store as well as the SDcard of BB. and then i manually entered some data in the files.
my application does a search within the contents of the file. so i gave a word for eg. "hi" as an input and all the files that contain the word "hi" in their contents.
now i want to use the same approach of mine for diffrent file types like .doc , .ppt , .docx, .pptx , .pdf (all document types specifically supported by the blackberry) and also for diffrent image types like .png, .jpeg , .gif (all image type supported by blackberry) and finally the mailboxes of the blackberry email client .
i have tried to do the same in java and it is possible to do so. and when i did this in java i had to use some specific JAR's for the file types (i have done this only for document types till now).
is it possible for me to incorporate this JAR's in my BB app?
please help....ITS urgent
This is a request to the prodigy PETER STRANGE to look into my matter. i have learnt it all from you sir
hoping to hear from you soon....
05-07-2011 09:02 AM - edited 05-07-2011 09:02 AM
Oh dear, I am going to come up short here....
Sorry I have no idea how one would search file types like doc and ppt for text strings. I don't even know how I would do it on the PC. ANd ask for searching image files, well that is beyond me.
But it appears you have jars that will do this for you. Again I'm going to come up short. I think I know how to do this in JDE, but I'll bet you are using Eclipse.
But a word of caution. In order for these jars to be useful on the BlackBerry, they can not use any Java that the BlackBerry does not support. This basically means they have to be compiled using Java 1.4, which is pretty old. And they can't use any facilities that the BlackBerry Java VM does not support. So I would be suspicious that the jars you have will not even work on the BlackBerry, even after you have converted these to a cod file for loading.
Do you have access to the source for these jars?
05-07-2011 09:09 AM
My thoughts on this:
I have done something similar on a server environment and it is not easy. Regarding the amount of file types you may need to support, never mind the versions (the MS stuff changed quite dramatically from 2003 to 2010), I simply cannot see a BB doing this well.
Better approach would be a server side implementation.
05-09-2011 12:45 AM - edited 05-09-2011 01:55 AM
i have acces to the class files, but i dont have any .java file as such from that jar. i tried decompiling it but hard luck.
the jar name is poi.jar version 3.7 and this is specifically for microsoft document types.i have attached it here. As tried in J2SE it works perfect, but J2ME i hardly have any idea. There is an alternate way to do this fuctionality even i.e. by reading bytes from the file.i saw in forums here, there is a program which reads through the contents of the Email and also the attachments for the Email. The reading is done in Byte format. Can this approach help in case of diffrent Document type? As this bytes are returning Hexadecimal values those can be converted to string. But even there are some garbage values added in such a conversion.
and about the image types i would like to approach is an cross application approach. can i integrate an OCR application into my app?.
05-09-2011 01:51 AM
i didnot get your perspective on this. how it will be possible to remotely perform the search ? can you be more specific?
i think this would be a good idea,but this will be just a connection as per i understand and not an app?
05-09-2011 08:20 AM - edited 05-09-2011 08:21 AM
Sorry, you will not be able to use poi.jar on a BlackBerry, or in fact on any J2ME device.
You can of course read the individual bytes in the files, and, if you understand the file format, interpret them and decide if they are text or not. But you will have to understand the file formats.
Re OCR, if you can find a J2ME OCR package, then you can sue this to convert an image into text. I am not aware of one.
But if your documents were based on a Server, then you can run poi.jar on the Server and return the results to the BlackBerry. For me, this is the simplest solution.
05-09-2011 01:02 PM
05-09-2011 01:10 PM
05-09-2011 01:22 PM
05-09-2011 07:16 PM
"so the code signing of the jars wont help"
Correct, it will not help.
"i have seen nokia java ocr applications"
I can't find anything.
"And one more thing i would like to add up is can a server do this scan in a connection itself?
In such sort of scenario that i am thinking is that server is reading the devices memory and picking up all th contents from it."
No, the Server would need 'local' (to the server) access to the file(s) to be searched.
"how can server do this effectively for many blackberry devices"
Good question - there is a challenge.
"does the blackberry device only uses the default email client or there are other legacy applications too?"
Don't know what you mean here. Other text based data that you might want to search includes other PIM data (e.g. Calendar, Memo and/or Tasks). Note also that a BlackBerry can support a number of email addresses too.
"... please give me your contact."
Sorry, not something I do. If you need me, you can PM me. But I only answer questions on the forum.