├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── delete.png
│ │ │ │ ├── export.png
│ │ │ │ ├── icon_camera.png
│ │ │ │ ├── icon_capture.png
│ │ │ │ └── icon_gallery.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── delete.png
│ │ │ │ ├── export.png
│ │ │ │ ├── icon_camera.png
│ │ │ │ ├── icon_capture.png
│ │ │ │ └── icon_gallery.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── delete.png
│ │ │ │ ├── export.png
│ │ │ │ ├── icon_camera.png
│ │ │ │ ├── icon_capture.png
│ │ │ │ └── icon_gallery.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── delete.png
│ │ │ │ ├── export.png
│ │ │ │ ├── icon_camera.png
│ │ │ │ ├── icon_capture.png
│ │ │ │ └── icon_gallery.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── delete.png
│ │ │ │ ├── export.png
│ │ │ │ ├── icon_camera.png
│ │ │ │ ├── icon_capture.png
│ │ │ │ └── icon_gallery.png
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── strings.xml
│ │ │ ├── drawable
│ │ │ │ ├── ripple_effect.xml
│ │ │ │ ├── ripple_effect_background.xml
│ │ │ │ ├── ic_flash_on_white_24dp.xml
│ │ │ │ ├── ic_flash_off_white_24dp.xml
│ │ │ │ ├── ic_flash_auto_white_24dp.xml
│ │ │ │ ├── ic_save_grey_24dp.xml
│ │ │ │ ├── ic_content_copy_colour_24dp.xml
│ │ │ │ ├── ic_content_copy_white_24dp.xml
│ │ │ │ ├── ic_save_white_24dp.xml
│ │ │ │ ├── ic_share_white_24dp.xml
│ │ │ │ ├── ic_share_colour_24dp.xml
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── anim
│ │ │ │ ├── push_left_out.xml
│ │ │ │ └── push_left_in.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── menu
│ │ │ │ ├── text_activity_menu_preview.xml
│ │ │ │ └── text_activity_menu.xml
│ │ │ ├── layout
│ │ │ │ ├── loading_dialoag.xml
│ │ │ │ ├── activity_text.xml
│ │ │ │ ├── activity_camera.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── recyclerview_item.xml
│ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ └── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── ayusma
│ │ │ │ └── textrecognition
│ │ │ │ ├── Helper
│ │ │ │ ├── Saver.java
│ │ │ │ ├── SharedHelper.java
│ │ │ │ └── SQLiteDatabaseHelper.java
│ │ │ │ ├── TextActivity.java
│ │ │ │ ├── Operation.java
│ │ │ │ ├── Adapter
│ │ │ │ └── RecyclerViewAdapter.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── CameraActivity.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── ayusma
│ │ │ └── textrecognition
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── ayusma
│ │ └── textrecognition
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradlew
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .idea
├── encodings.xml
├── misc.xml
├── runConfigurations.xml
└── gradle.xml
├── .gitignore
├── gradle.properties
├── LICENSE
├── README.md
└── gradlew.bat
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/gradlew
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-hdpi/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-hdpi/export.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-mdpi/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-mdpi/export.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xhdpi/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xhdpi/export.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxhdpi/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxhdpi/export.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxxhdpi/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxxhdpi/export.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-hdpi/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_capture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-hdpi/icon_capture.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-hdpi/icon_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-mdpi/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/icon_capture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-mdpi/icon_capture.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/icon_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-mdpi/icon_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xhdpi/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_capture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xhdpi/icon_capture.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xhdpi/icon_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxhdpi/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/icon_capture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxhdpi/icon_capture.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/icon_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxhdpi/icon_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxxhdpi/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/icon_capture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxxhdpi/icon_capture.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/icon_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyusmaTech/TextRecognition/HEAD/app/src/main/res/drawable-xxxhdpi/icon_gallery.png
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 8dp
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ripple_effect.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ripple_effect_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/push_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #E91E63
4 | #C2185B
5 | #F50057
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/push_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jul 30 00:30:11 WAT 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_flash_on_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_flash_off_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_flash_auto_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_save_grey_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_content_copy_colour_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_content_copy_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_save_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/test/java/com/ayusma/textrecognition/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.ayusma.textrecognition;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/text_activity_menu_preview.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ayusma/textrecognition/Helper/Saver.java:
--------------------------------------------------------------------------------
1 | package com.ayusma.textrecognition.Helper;
2 |
3 | public class Saver {
4 |
5 | public Saver() {
6 | }
7 |
8 |
9 | public Saver(int id, String text) {
10 | this.id = id;
11 | this.text = text;
12 | }
13 |
14 | public int getId() {
15 | return id;
16 | }
17 |
18 | public String getText() {
19 | return text;
20 | }
21 |
22 | private int id;
23 | private String text;
24 |
25 |
26 | public void setId(int id) {
27 | this.id = id;
28 | }
29 |
30 | public void setText(String text) {
31 | this.text = text;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/loading_dialoag.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_share_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_share_colour_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/text_activity_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | android.enableJetifier=true
10 | android.useAndroidX=true
11 | org.gradle.jvmargs=-Xmx1536m
12 | # When configured, Gradle will run in incubating parallel mode.
13 | # This option should only be used with decoupled projects. More details, visit
14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15 | # org.gradle.parallel=true
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/ayusma/textrecognition/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.ayusma.textrecognition;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.ayusma.textrecognition", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | -dontwarn com.google.android.gms.**
24 | -keepclasseswithmembers class com.camerakit.preview.CameraSurfaceView {
25 | native ;
26 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Wojuola Ayotola
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ayusma/textrecognition/Helper/SharedHelper.java:
--------------------------------------------------------------------------------
1 | package com.ayusma.textrecognition.Helper;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | public class SharedHelper {
7 |
8 | public static SharedPreferences sharedPreferences;
9 | public static SharedPreferences.Editor editor;
10 |
11 | public static void putKey(Context context, String Key, String Value) {
12 | sharedPreferences = context.getSharedPreferences("Cache", Context.MODE_PRIVATE);
13 | editor = sharedPreferences.edit();
14 | editor.putString(Key, Value);
15 | editor.apply();
16 |
17 | }
18 |
19 | public static String getKey(Context contextGetKey, String Key) {
20 | sharedPreferences = contextGetKey.getSharedPreferences("Cache", Context.MODE_PRIVATE);
21 | String Value = sharedPreferences.getString(Key, "");
22 | return Value;
23 |
24 | }
25 |
26 | public static void clearSharedPreferences(Context context)
27 | {
28 | sharedPreferences = context.getSharedPreferences("Cache", Context.MODE_PRIVATE);
29 | sharedPreferences.edit().clear().apply();
30 | }
31 |
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TextRecognition
3 | Copy
4 | Save
5 | Share
6 | Export
7 | Delete
8 | Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample
9 | You do not have any recognized saved text yet. Tap on the camera icon to capture
10 | Please Wait! This may take a moment.
11 | Processing
12 | exported successfully,check your documents folder
13 | You have to enable permission to export text
14 | No
15 | Yes
16 | Are you sure you want to delete this?
17 | Are you sure you want to export this?
18 | Export as TXT
19 | Ok
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
15 |
16 |
24 |
25 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TextRecognition
2 | This is an android app that make use of the Firebase ML Kit
3 |
4 | You can select an image from gallery or capture a new image to scan. With this app you can save the recognized text to the databse to access later,you can also copy the recognized text to the clipboard, share the recognized text, and also export the text as a .txt format to your documents folder
5 |
6 | ## Sdk Requirements
7 | * Minimum SDK Requirement - android API 21 (Lollipop)
8 | * Target SDK - android API 28 (Pie)
9 |
10 |
11 | ## Installation
12 | Clone this repository and import into android studio
13 |
14 | `git clone https://github.com/AyusmaTech/TextRecognition.git`
15 |
16 |
17 | ## Screenshots
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ## Gif
27 |
28 |
29 |
30 |
31 |
32 | ## Third-Party Dependencies
33 |
34 | [CameraKit](https://github.com/CameraKit/camerakit-android "CameraKit")
35 |
36 | [MediaPicker](https://github.com/alhazmy13/MediaPicker "MediaPicker")
37 |
38 | [ML Kit for Firebase](https://github.com/firebase/quickstart-android/tree/master/mlkit "ML Kit for Firebase")
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
17 |
18 |
19 |
29 |
30 |
31 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.ayusma.textrecognition"
7 | minSdkVersion 21
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'androidx.appcompat:appcompat:1.0.2'
24 | implementation 'com.google.android.material:material:1.0.0'
25 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
26 | implementation 'com.google.firebase:firebase-core:17.0.0'
27 | implementation 'com.google.firebase:firebase-ml-vision:22.0.0'
28 | implementation 'com.camerakit:camerakit:1.0.0-beta3.10'
29 | implementation 'com.camerakit:jpegkit:0.1.0'
30 | implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0'
31 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'
32 | implementation 'net.alhazmy13.MediaPicker:libary:2.4.4'
33 |
34 | testImplementation 'junit:junit:4.12'
35 | androidTestImplementation 'androidx.test:runner:1.1.0'
36 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
37 | }
38 |
39 | apply plugin: 'com.google.gms.google-services'
40 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.ayusma.alcchallenge", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
15 |
16 |
32 |
33 |
49 |
50 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
13 |
14 |
15 |