azzimfarid / tesseract-android-tools

Automatically exported from code.google.com/p/tesseract-android-tools
0 stars 0 forks source link

activity finish automatically. #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
hello,

i i have task to capture test from image so that i decide  to  use tesseract 
lib,

i have successfully build the library project. and create on another android 
project name demoOcr in that i add library project as 
tesseract-android-tools-1.00.

following is my activity class.

<code>
public class OcrDemoActivity extends Activity {

    private TextView txtData = null;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        txtData = (TextView)findViewById(R.id.txtdata);

        File sdcard = Environment.getExternalStorageDirectory();
        File from = new File(sdcard, "Pic.jpg");
        TessBaseAPI api = new TessBaseAPI();
        api.init("/mnt/sdcard/tessdata/", "eng");
        api.setImage(from);
        txtData.setText(api.getUTF8Text());

    }

</code>

i have add tessdata in my sdcard as well as Pic.jpg

but the now probleme is when i run this project in my samsung galaxy tab hust 
activity load and finish automatically.

i have seen that on logcat that given error that request time failed: 
Java.Net.socketExcepton : Address family not suport by Protocol.

Please Help me out.

What is missing?

Regards.
Milind Kanani

Original issue reported on code.google.com by milind.v...@gmail.com on 9 Sep 2011 at 6:19

GoogleCodeExporter commented 8 years ago
Please provide logcat output for your activity.

Original comment by alanv@google.com on 11 Sep 2012 at 8:28

GoogleCodeExporter commented 8 years ago

Original comment by alanv@google.com on 14 Sep 2012 at 6:38