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

Commit

Permalink
updated tesseract to 4.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: SubhamTyagi <[email protected]>
  • Loading branch information
SubhamTyagi committed Mar 27, 2019
1 parent 0cd451a commit f4d4269
Show file tree
Hide file tree
Showing 20 changed files with 426 additions and 351 deletions.
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@

[![licence](https://img.shields.io/badge/Licence-GPLv3-red.svg)](https://github.com/SubhamTyagi/loco-answers/blob/master/LICENSE) ![version](https://img.shields.io/badge/Version-2.2.2-green.svg)[ ![HitCount](http://hits.dwyl.io/SubhamTyagi/loco-answers.svg)](http://hits.dwyl.io/SubhamTyagi/loco-answers)
Welcome file


[![licence](https://img.shields.io/badge/Licence-GPLv3-red.svg)](https://github.com/SubhamTyagi/loco-answers/blob/master/LICENSE) ![version](https://img.shields.io/badge/Version-2.3.0-green.svg)[ ![HitCount](http://hits.dwyl.io/SubhamTyagi/loco-answers.svg)](http://hits.dwyl.io/SubhamTyagi/loco-answers) ![GitHub All Releases](https://img.shields.io/github/downloads/SubhamTyagi/loco-answers/total.svg?style=social)


# Trivia hack <a target="_blank" href="https://paypal.me/shubhamtyagi1" title="Donate using PayPal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" /></a>


* A free, 100 % open source, ads free trivia helper app that respect user sentiments.
* Previously Known as LoKo HacK

## Features
* Free ,open source, No ads.
* Highest Accuracy.
* Highest Speed.
* Bug reporter.
* Trivia Games Supported by OCR and Accessibility
* Trivia Games Supported by OCR and Accessibility
## 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>

* 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.
* [Download latest Apk File](https://github.com/SubhamTyagi/loco-answers/releases)
* [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)
* **Why this app not on play store:** Because i support **Open-source software advocacy** and i hate Google Play store. This app will be available on open-source market such as F-Droid (i am working for comply with the [F-Droid's inclusion policy](https://f-droid.org/docs/Inclusion_Policy/?title=Inclusion_Policy))
## See Demo on YouTube
* ### [Here](https://youtu.be/H0LvFNW_svA)
## Supported Apps
- ### All Apps supported
##### Following apps are also supported by Accessibility.
- ### All Apps supported
##### Following apps are also supported by Accessibility.
1. Loco `version 2.1.9 or older`
2. Brainbazzi `2.0.4 or older`
3. Qureka `latest 1.0.30 or older`
4. SWOO `5.7.0 or older`
5. HQ `1.6.2 or older`
6. The Question `2.0.6 or older`
8. We Show
8. We Show
9. Mob Show
10. Swag IQ

Expand All @@ -41,7 +46,7 @@
|:-:|:-:|
| ![home](/.github/assets/home.jpg?raw=true "home") | ![profile](/.github/assets/profile.jpg?raw=true "profile") |

| Settings |Search|
| Settings |Search|
|:-:|:-:|
|![Settings](/.github/assets/settings.jpg?raw=true "Settings") | ![Search](/.github/assets/search.jpg?raw=true "Search")|
|Language|
Expand All @@ -54,27 +59,28 @@
- [Anton]( https://vk.com/f0ris) for [Sweet Alert dialog](https://github.com/F0RIS/sweet-alert-dialog).
- [Bal Sikandar](balsikandar.github.io) for [CrashReporter](https://github.com/MindorksOpenSource/CrashReporter).
- [Robert Theis](http://www.rmtheis.com/) for [Tesseract Tools for Android](https://github.com/rmtheis/tess-two).
- [Robert Pösel](https://github.com/Robyer) for[Tesseract 4 Tool for Android](https://github.com/adaptech-cz/Tesseract4Android)
- [Kamran](http://kamranzafar.github.com/) for [Jtar](https://github.com/kamranzafar/jtar).
- [Jonathan Hedley](http://jonathanhedley.com) for [Jsoup](https://jsoup.org/).
- [Arthur](http://TheArtOfDev.com/) for [Android Image Cropper](https://github.com/ArthurHub/Android-Image-Cropper).

## Why app is Re-named

- Old name pronunciation was same as one trivia game. Some uses are confused by old name and they thought this app is only work with particular game although that was not true.


- Old name pronunciation was same as one trivia game. Some uses are confused by old name and they thought this app is only work with particular game although that was not true.



## Open Source License
Copyright 2018 SHUBHAM TYAGI
Licensed under the FOLLOWING TERMS and as per GPL V3
you may not use this file except in compliance with the License. If there is any conflict between these line and GPL v3 then GPL v3 Licence will prevail.
you may not use this file except in compliance with the License. If there is any conflict between these line and GPL v3 then GPL v3 Licence will prevail.

you may do good and not evil.
you find forgiveness for yourself and forgive others.
you must share this freely, never taking and talking more than you give.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
17 changes: 8 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ android {
applicationId "ai.loko.hk.ui"
minSdkVersion 19 //19
targetSdkVersion 28
versionCode 27
versionName '2.2.2'
versionCode 28
versionName '2.3.0'
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
versionNameSuffix '-capybara'
versionNameSuffix '-cat'
vectorDrawables.useSupportLibrary = true
resConfigs "en"
//archivesBaseName "Trivia-hack-v"+versionName+".apk"
Expand Down Expand Up @@ -102,19 +102,18 @@ dependencies {
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation 'com.google.android.gms:play-services-vision:17.0.2'

def room_version = "1.1.1"
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
//def room_version = "2.1.0-alpha06"
implementation "android.arch.persistence.room:runtime:1.1.1"
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.nightonke:boommenu:2.1.1'
implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
implementation 'com.github.f0ris.sweetalert:library:1.5.6'
implementation 'com.rmtheis:tess-two:9.0.0'
//implementation 'com.rmtheis:tess-two:9.0.0'
implementation project(path: ':crashreporter')
implementation project(':tesseract4android')
}

/*tasks setOutputName(){
Expand Down
Binary file added app/libs/tesseract4android.aar
Binary file not shown.
11 changes: 3 additions & 8 deletions app/src/main/java/ai/loko/hk/ui/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,25 +296,20 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {

@Override
protected void onResume() {
/*
Note this this list preference value will be ignored by Trivia hack 2.0
because i think google search engine is best for our services .
as search engine does not allow bot search google is some time flexibly due to his high usage
*/

if (sharedPref.getBoolean(getString(R.string.custom_search_engine), false))
Data.BASE_SEARCH_URL = sharedPref.getString(getString(R.string.custom_search_engine_url), "https://www.google.com/search?q=");
else
Data.BASE_SEARCH_URL = sharedPref.getString(getString(R.string.search_engine_key), "https://www.google.com/search?q=");
// Data.GRAYSCALE_IAMGE_FOR_OCR = sharedPref.getBoolean(getString(R.string.grayscale_image_ocr), false);


//these values are setted before due to performance
Data.IMAGE_LOGS_STORAGE = sharedPref.getBoolean(getString(R.string.save_image_and_file_to_storage_key), true);
Data.IS_TESSERACT_OCR_USE = sharedPref.getBoolean(getString(R.string.tesseract_key), false);
Data.FAST_MODE_FOR_OCR = sharedPref.getBoolean(getString(R.string.fast_mode_key), false);

if (Data.IS_TESSERACT_OCR_USE) {
Data.TESSERACT_LANGUAGE = sharedPref.getString(getString(R.string.language_for_tesseract), "en");
Data.TESSERACT_LANGUAGE = sharedPref.getString(getString(R.string.language_for_tesseract), "eng");
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && Settings.canDrawOverlays(this)) {
Expand Down Expand Up @@ -387,7 +382,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
new File(Constant.path).mkdirs();
new File(Constant.pathToErrors).mkdirs();
new File(Constant.pathToTesseract).mkdirs();
new File(Constant.pathOfTesseractData).mkdirs();
try {
new File(Constant.path, ".nomedia").createNewFile();
} catch (IOException e) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/ai/loko/hk/ui/MyApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
import com.balsikandar.crashreporter.CrashReporter;

import ai.loko.hk.ui.constants.Constant;
import ai.loko.hk.ui.utils.SpUtil;

public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
SpUtil.getInstance().init(this);
CrashReporter.initialize(this, Constant.pathToErrors);
}

Expand Down
Loading

0 comments on commit f4d4269

Please sign in to comment.