Skip to content

Commit 23527c9

Browse files
author
Apple
committed
add README.md
1 parent 6abf940 commit 23527c9

File tree

33 files changed

+166
-26
lines changed

33 files changed

+166
-26
lines changed

.DS_Store

8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
800 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
136 Bytes
Binary file not shown.
38.7 KB
Binary file not shown.
195 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

.gradle/checksums/checksums.lock

0 Bytes
Binary file not shown.

.gradle/checksums/sha1-checksums.bin

18.1 KB
Binary file not shown.

.idea/.name

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/Text_Recognition_App.iml renamed to .idea/modules/Android_OCR.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/app/app.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 85 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
1-
# Android-OCR
1+
# Android OCR
2+
3+
![Platform](https://img.shields.io/badge/platform-Android-yellow.svg)](https://www.android.com)
4+
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html)
5+
[![Gradle Version](https://img.shields.io/badge/gradle-4.0-green.svg)](https://docs.gradle.org/current/release-notes)
6+
[![Awesome Badge](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://java-lang.github.io/awesome-java)
7+
28
A simple Android OCR (Optical Character Recognition) application that makes use of with Camera or Gallery (Image to Text).
9+
10+
# Source
11+
Repo to demonstrate Optical Character Recognition in Android. This is a follow up on the youtube at :
12+
13+
[Text Recognition App](https://www.youtube.com/watch?v=mmuz8qIWcL8)
14+
15+
# Demo App
16+
17+
[Demo Download](https://github.com/achmadqomarudin/Android-OCR/blob/master/screenshots/app-demo.apk)
18+
19+
<table style="width:100%">
20+
<tr>
21+
<th>Example 1</th>
22+
<th>Example 2</th>
23+
</tr>
24+
<tr>
25+
<td><img src="screenshots/1.gif"/></td>
26+
<td><img src="screenshots/2.gif"/></td>
27+
</tr>
28+
</table>
29+
30+
# License
31+
32+
```
33+
Copyright (C) Achmad Qomarudin
34+
35+
Licensed under the Apache License, Version 2.0 (the "License");
36+
you may not use this file except in compliance with the License.
37+
You may obtain a copy of the License at
38+
39+
http://www.apache.org/licenses/LICENSE-2.0
40+
41+
Unless required by applicable law or agreed to in writing, software
42+
distributed under the License is distributed on an "AS IS" BASIS,
43+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44+
See the License for the specific language governing permissions and
45+
limitations under the License.
46+
```

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ android {
55
buildToolsVersion "30.0.1"
66

77
defaultConfig {
8-
applicationId "com.project.textrecognitionapp"
8+
applicationId "com.project.androidocr"
99
minSdkVersion 21
1010
targetSdkVersion 29
1111
versionCode 1

app/src/androidTest/java/com/project/textrecognitionapp/ExampleInstrumentedTest.java renamed to app/src/androidTest/java/com/project/androidocr/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.project.textrecognitionapp;
1+
package com.project.androidocr;
22

33
import android.content.Context;
44

@@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
2121
public void useAppContext() {
2222
// Context of the app under test.
2323
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24-
assertEquals("com.project.textrecognitionapp", appContext.getPackageName());
24+
assertEquals("com.project.androidocr", appContext.getPackageName());
2525
}
2626
}

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.project.textrecognitionapp">
3+
package="com.project.androidocr">
44

55
<uses-permission android:name="android.permission.CAMERA"/>
66
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
77

88
<application
99
android:allowBackup="true"
10-
android:icon="@mipmap/ic_launcher"
10+
android:icon="@drawable/ic_icon"
1111
android:label="@string/app_name"
12-
android:roundIcon="@mipmap/ic_launcher_round"
12+
android:roundIcon="@drawable/ic_icon"
1313
android:supportsRtl="true"
1414
android:theme="@style/AppTheme">
15-
<activity android:name=".MainActivity">
15+
<activity android:name="com.project.androidocr.MainActivity">
1616
<intent-filter>
1717
<action android:name="android.intent.action.MAIN" />
1818

app/src/main/java/com/project/textrecognitionapp/MainActivity.java renamed to app/src/main/java/com/project/androidocr/MainActivity.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.project.textrecognitionapp;
1+
package com.project.androidocr;
22

33
import androidx.annotation.NonNull;
44
import androidx.annotation.Nullable;
@@ -76,13 +76,26 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
7676
showImageImportDialog();
7777
break;
7878

79-
case R.id.settings:
80-
Toast.makeText(this, "Settings", Toast.LENGTH_SHORT).show();
79+
case R.id.about:
80+
dialogAbout();
8181
break;
8282
}
8383
return true;
8484
}
8585

86+
private void dialogAbout() {
87+
new AlertDialog.Builder(this)
88+
.setTitle("About App")
89+
.setMessage("This app is made by Achmad Qomarudin.")
90+
.setPositiveButton("CLOSE", new DialogInterface.OnClickListener() {
91+
@Override
92+
public void onClick(DialogInterface dialog, int which) {
93+
dialog.dismiss();
94+
}
95+
})
96+
.show();
97+
}
98+
8699
private void showImageImportDialog() {
87100
String[] items = {"Camera", "Gallery"};
88101
AlertDialog.Builder dialog = new AlertDialog.Builder(this);
22.4 KB
Loading

app/src/main/res/menu/main_menu.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
android:icon="@drawable/ic_action_image"/>
99

1010
<item
11-
android:id="@+id/settings"
12-
android:title="Setting"/>
11+
android:id="@+id/about"
12+
android:title="About"/>
1313
</menu>

app/src/main/res/values/colors.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<color name="colorPrimary">#FF9800</color>
4-
<color name="colorPrimaryDark">#FF5722</color>
5-
<color name="colorAccent">#03DAC5</color>
3+
<color name="colorPrimary">#656060</color>
4+
<color name="colorPrimaryDark">#5b5555</color>
5+
<color name="colorAccent">#656060</color>
66
</resources>

app/src/test/java/com/project/textrecognitionapp/ExampleUnitTest.java renamed to app/src/test/java/com/project/androidocr/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.project.textrecognitionapp;
1+
package com.project.androidocr;
22

33
import org.junit.Test;
44

screenshots/1.gif

11.9 MB
Loading

screenshots/2.gif

5.34 MB
Loading

screenshots/app-demo.apk

3.74 MB
Binary file not shown.

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include ':app'
2-
rootProject.name = "Text Recognition App"
2+
rootProject.name = "Android OCR"

0 commit comments

Comments
 (0)