Digit Recognition is an Android application which recognizes digits in images and is based on client-server model. The main aim of the client application is to take a picture, send it to the server and display the results. Digit recognition is carried out on the server.

## Hidden options

### Copy or Share

To copy or share the result, hold your finger on the recognized number and choose the desired option.

## Settings

Click the Menu button and choose settings to set a different path to a script or to toggle the light.

## Integration to external application

To use the application and receive the result in external application, at first define the following intent-filter in the external application:

<intent-filter>
<action android:name="digitrecognition.GAUGE_RECOGNITION" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>

Then, use the following code to call the activity of the Digit Recognition application.

Intent intent = new Intent();
intent.setAction("cz.muni.fi.digitrecognition.GAUGE_RECOGNITION");
intent.setClassName("cz.muni.fi.digitrecognition","cz.muni.fi.digitrecognition.CaptureActivity");
if(intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intent, 0);
}

To process the result, call the onActivityResult method as follows:

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 0 && resultCode == RESULT_OK && data != null) {
int recognizedNumber = data.getIntExtra("GAUGE", 0);
}
}

Source code of the demo application is available at https://github.com/jakubkriz/TestApp.

## Detailed description

### Initial screen

### Result

## Source code

The source code is available at https://github.com/jakubkriz/DigitRecognition.