Skip to content
This repository was archived by the owner on Jan 29, 2024. It is now read-only.

Commit 456cb95

Browse files
committed
dependecies update and filipino language
1 parent fc63f6d commit 456cb95

13 files changed

Lines changed: 47 additions & 41 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55

66

77
* A free, 100 % open source, ads free trivia helper app that respect user sentiments.
8-
* Previously Known as LoKo HacK
9-
* **(16/Nov/2019:00:07 ist):** it is time to say goodbye to this repo. As today i quit programming and development efforts. Todays efforts was the last efforts towards my apps developments. No further updates to this repo from my side.
8+
* Previously Known as LoKo HacK
9+
* It is time to say goodbye to this repo. No further updates to this repo from my side.
1010

11-
### * Version 2.5.1 is the last and latest version of this wonderful app.
11+
### * Version 2.6 is the latest version of this app.
1212

1313
## Features
1414
* Free ,open source, No ads.
1515
* Highest Accuracy.
1616
* Highest Speed.
1717
* Bug reporter.
1818
* Trivia Games Supported by OCR and Accessibility
19-
## Download <a target="_blank" href="https://paypal.me/shubhamtyagi1" title="Donate using PayPal"><img src="https://img.shields.io/badge/paypal-donate-red.svg" /></a>
20-
19+
## Download
2120
* Before downloading please give this app a :star: by pressing ![Star](/.github/assets/star.PNG) it means a lot to me it boost me to build more features and help you guys.
2221
* [Download latest Apk File](https://github.com/SubhamTyagi/loco-answers/releases) ![GitHub All Releases](https://img.shields.io/github/downloads/SubhamTyagi/loco-answers/total.svg?style=social)
2322

app/build.gradle

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ android {
3636
applicationId "ai.loko.hk.ui"
3737
minSdkVersion 19
3838
targetSdkVersion 28
39-
versionCode 32
40-
versionName '2.5.1'
39+
40+
versionCode 33
41+
versionName '2.6'
42+
4143
multiDexEnabled true
4244
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
43-
versionNameSuffix '-Coral'
45+
versionNameSuffix '-Cow'
4446
vectorDrawables.useSupportLibrary = true
4547
resConfigs "en"
4648

@@ -87,16 +89,16 @@ android {
8789
dependencies {
8890
implementation fileTree(include: ['*.jar'], dir: 'libs')
8991
implementation 'androidx.multidex:multidex:2.0.1'
90-
implementation 'androidx.recyclerview:recyclerview:1.1.0-rc01'
91-
implementation 'com.google.android.material:material:1.2.0-alpha01'
92+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
93+
implementation 'com.google.android.material:material:1.3.0-alpha01'
9294
implementation 'androidx.appcompat:appcompat:1.1.0'
9395
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
9496
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
95-
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3'
96-
implementation 'com.google.android.gms:play-services-vision:19.0.0'
97-
implementation 'androidx.room:room-runtime:2.2.1'
98-
annotationProcessor 'androidx.room:room-compiler:2.2.1'
99-
implementation 'org.jsoup:jsoup:1.12.1'
97+
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6'
98+
implementation 'com.google.android.gms:play-services-vision:20.1.0'
99+
implementation 'androidx.room:room-runtime:2.2.5'
100+
annotationProcessor 'androidx.room:room-compiler:2.2.5'
101+
implementation 'org.jsoup:jsoup:1.13.1'
100102
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
101103
implementation 'com.nightonke:boommenu:2.1.1'
102104
implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
@@ -105,7 +107,8 @@ dependencies {
105107
//downloader
106108
//implementation 'com.ixuea:AndroidDownloader:2.0.6'
107109
implementation project(path: ':crashreporter')
108-
implementation project(':tesseract4android')
110+
implementation 'cz.adaptech.android:tesseract4android:2.1.0'
111+
109112
}
110113

111114

app/src/main/java/ai/loko/hk/ui/activities/CropActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
9797

9898
@Override
9999
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
100+
super.onActivityResult(requestCode, resultCode, data);
100101
if (resultCode == RESULT_OK) {
101102
switch (requestCode) {
102103
case IMAGE_PIC_INTENT_CODE: {

app/src/main/java/ai/loko/hk/ui/ocr/option4/ImageTextReader4.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public ImageTextReader4(Context context) {
7272
}
7373

7474
//will return String[5] 0-> question 1->option1 2->option2 3-> option3 4->option4
75+
76+
7577
public String[] getTextFromBitmap(Bitmap src) {
7678
if (textRecognizer.isOperational() && src != null) {
7779

@@ -117,6 +119,7 @@ public int compare(Text t1, Text t2) {
117119
}
118120
}
119121
}
122+
120123
String lines2 = lines.toString();
121124

122125
int indexOfQuestionMark = 0;
@@ -147,10 +150,12 @@ public int compare(Text t1, Text t2) {
147150
}
148151
return new String[]{question.toString(), textOnScreen[lineCount - 4], textOnScreen[lineCount - 3], textOnScreen[lineCount - 2], textOnScreen[lineCount - 1], lines2};
149152
}
153+
150154
return new String[]{"Scan Failed: Could not read options"};
151155

152156
} else {
153157
return new String[]{"Scan Failed: Could not set up the detector!"};
154158
}
155159
}
160+
156161
}

app/src/main/java/ai/loko/hk/ui/ocr/option4/TesseractImageTextReader4.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,28 @@
3535

3636
import java.util.ArrayList;
3737

38-
import ai.loko.hk.ui.constants.Constant;
3938
import ai.loko.hk.ui.utils.Logger;
4039

4140
//TODO: PIXA
4241
public class TesseractImageTextReader4 {
4342

4443
private static volatile TessBaseAPI api;
4544

46-
public static TesseractImageTextReader4 geInstance(String path ,String language) {
45+
public static TesseractImageTextReader4 geInstance(String path, String language) {
4746
api = new TessBaseAPI();
4847
api.init(path, language);
4948
api.setPageSegMode(TessBaseAPI.PageSegMode.PSM_AUTO_OSD);
5049
return new TesseractImageTextReader4();
5150
}
5251

53-
public String[] getTextFromBitmap(Bitmap src) {
52+
53+
public String[] getTextFromBitmap(Bitmap src) {
5454
api.setImage(src);
5555
String textOnImage;
5656

5757
try {
5858
textOnImage = api.getUTF8Text();
59-
// api.end();
59+
// api.end();
6060
} catch (Exception e) {
6161
Logger.logException(e);
6262
return new String[]{"Scan Failed: Could not set up the detector!"};
@@ -67,6 +67,7 @@ public String[] getTextFromBitmap(Bitmap src) {
6767
}
6868

6969
String[] textOnScreenArray = textOnImage.split("\n");
70+
7071
ArrayList<String> textOnScreen = new ArrayList<>();
7172

7273
for (String s : textOnScreenArray) {
@@ -75,13 +76,15 @@ public String[] getTextFromBitmap(Bitmap src) {
7576
}
7677
}
7778
int lineCount = textOnScreen.size();
79+
7880
if (lineCount > 4) {
7981
StringBuilder question = new StringBuilder();
8082
for (int i = 0; i < lineCount - 4; i++) {
8183
question.append(textOnScreen.get(i));
8284
}
83-
return new String[]{question.toString(),textOnScreen.get(lineCount - 4), textOnScreen.get(lineCount - 3), textOnScreen.get(lineCount - 2), textOnScreen.get(lineCount - 1), textOnImage};
84-
}else {
85+
86+
return new String[]{question.toString(), textOnScreen.get(lineCount - 4), textOnScreen.get(lineCount - 3), textOnScreen.get(lineCount - 2), textOnScreen.get(lineCount - 1), textOnImage};
87+
} else {
8588
StringBuilder question = new StringBuilder();
8689
for (int i = 0; i < lineCount; i++) {
8790
question.append(textOnScreen.get(i));

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
<item>Basque</item>
152152
<item>Persian</item>
153153
<item>Finnish</item>
154+
<item>Filipino</item>
154155
<item>French</item>
155156
<item>Frankish</item>
156157
<item>French,Middle(ca.1400–1600)</item>
@@ -255,6 +256,7 @@
255256
<item>eus</item>
256257
<item>fas</item>
257258
<item>fin</item>
259+
<item>fil</item>
258260
<item>fra</item>
259261
<item>frk</item>
260262
<item>frm</item>

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ buildscript {
3838
}
3939
}
4040
dependencies {
41-
classpath 'com.android.tools.build:gradle:3.5.2'
41+
classpath 'com.android.tools.build:gradle:3.6.3'
4242
// NOTE: Do not place your application dependencies here; they belong
4343
// in the individual module build.gradle files
44-
classpath 'com.google.gms:google-services:4.2.0'
44+
classpath 'com.google.gms:google-services:4.3.3'
4545

4646
}
4747
}

crashreporter/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ dependencies {
5454
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
5555
exclude group: 'com.android.support', module: 'support-annotations'
5656
})
57-
implementation 'androidx.recyclerview:recyclerview:1.1.0-rc01'
57+
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha03'
5858
implementation 'androidx.appcompat:appcompat:1.1.0'
59-
implementation 'com.google.android.material:material:1.2.0-alpha01'
59+
implementation 'com.google.android.material:material:1.3.0-alpha01'
6060
testImplementation 'junit:junit:4.12'
6161
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Nov 03 14:45:03 IST 2019
1+
#Wed Jun 10 14:41:05 IST 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include ':app', ':crashreporter', ':tesseract4android'
1+
include ':app', ':crashreporter'
22
/*
33
* Copyright (C) 2018 SHUBHAM TYAGI
44
*

0 commit comments

Comments
 (0)