Hello,

I am busy implementing Abbyy OCR software within an Android app. All I have is the Sample app, which works fine, but it is quite a lot of work of isolating the functionality for business card only. Could somebody give a pointer towards a simplest possible piece of code to get a photo on an Android device of a business card scanned? Thanks in advance!

Jan

P.S. the trouble I have (for starters) is that my _imageUri differs slightly from the one from the Sample app. My path contains '2%F' symbols, where the one in the Sample app does not. So how do you correctly setup a Uri?

This is how I call the Sample code:

        Builder builder = new Uri.Builder(); 
    builder.scheme("content"); 
    builder.authority("media"); 
    builder.appendPath("/external/images/media/579"); 
    Uri _imageUri = builder.build();
    RecognitionActivity.start( this.getActivity(), _imageUri );

This is how my Uri looks in the debugger:

Authority=”media”

Fragment=null

Host=”NOT CACHED”

Path=”/external/images/media/579”

Port=-2

Query=null

Scheme=”content”

Ssp=null

toString=”content://media/external/images/media/579”

userInfo=null

The difference with the Uri in the Sample app is for path only; there, both decoded & encoded say: /external/images/media/579

My app says: decoded="NOT CACHED" encoded="/%2Fmedia/%2Fexternal/%2Fimages/%2Fmedia/%2F579"

Not sure of course if this is the reason for the exception I get: nullpointer in Choreographer.doCallbacks (line 558)

Any help would be appreciated.

asked 24 Jan '14, 00:23

jhulst's gravatar image

jhulst
2114

edited 24 Jan '14, 01:10

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×52
×7
×7

Asked: 24 Jan '14, 00:23

Seen: 6,601 times

Last updated: 24 Jan '14, 01:10

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal