kiwix / kiwix-android

Kiwix for Android
https://android.kiwix.org
GNU General Public License v3.0
869 stars 443 forks source link

[Bug] Pop-up Function does not work correctly (fails to automatically “detect” headword and show results) #2795

Closed ghost closed 7 months ago

ghost commented 2 years ago

EDIT: Changed title from Feature Request to [Bug]. See comments below.

Describe the solution you'd like Implementing a Pop-up function that would allow on Android to use "Kiwix" as a Dictionary App and SHOW RESULTS AUTOMATICALLY. A good example is "DictTango" or "GoldenDict". Those Apps integrate with Android in such way that while reading any text on a browser or a book reader it is possible to tap over a word and send it AUTOMATICALLY to the dictionary App. Inmediately, Kiwix should pop up in the main screen to show the desired "headword" on a Wiktionary.

In such a way, it would be 10x faster to look up words on the Wiktionary on Kiwix App.

Additional context Browsers and Book readers on Android should be integrated with the Kiwix App to appear as a pop-up to increase the efficiency of consulting the Wiktionaries. "DictTango", "MDict" or "GoldenDict" are good examples to follow: https://play.google.com/store/apps/details?id=cn.jimex.dict&hl=en&gl=US

Using any of those Apps is much faster in comparison than using Kiwix !

gouri-panda commented 2 years ago

@GPLv3-fan We have a similar type of functionality. if you select any word on your phone android gives some options. In there we have a functionality called Search Kiwix which lets you search the given word inside the Kiwix app or custom app of ours. Try this out! Let us know what do you think? Thank you!

ghost commented 2 years ago

@gouri-panda the "Search Kiwix" has an important flaw:

If you are using a Browser or a Book Reader and search a word (e.g. "Biochemie" in German) with the Kiwix App, the pop-up appears and then it does not show the desired word automatically. Instead, it shows the word that was seen before.

Here is a concrete example with the "LibreraPro" on a Huawei cellphone (without Google Play Services):

1) Tap over the desired word: "Biochemie" image

2) "Search Kiwix" option detects the word "Biochemie" image

3) Kiwix does NOT show the word "Biochemie". Instead, the app shows the word seen before. Users have to manually type each letter and it is time-consuming is someone uses the App very often (100 times/day). image

Other Apps are much more convenient than Kiwix because the input is automatically inserted in the “search field” and the App shows the result automatically.

Could that feature be implemented ?

Thanks for your hard work ! :D

gouri-panda commented 2 years ago

@GPLv3-fan The issue has been fixed already. Is it your latest version? If you don't have google play store services on your phone you can download the APK from here.

ghost commented 2 years ago

@gouri-panda The bug happens on the latest Apk (3.4.5) from GitHub. The problem also happens with the previous version of Kiwix (3.4.4) downloaded via Aurora Store (Google Play front-end). Older version from F-Droid is the same.

I changed the title from Feature Request to [Bug].

_Is it possible that the code written in Kiwix depends on Google Services to function correctly ?

My cellphone is a Huawei P40 Lite E with Android 10 (updated EMUI version 10.1.0) . Please let me know how could I help to debug the issue. Thanks for your help.

gouri-panda commented 2 years ago

_Is it possible that the code written in Kiwix depends on Google Services to function correctly ?

I'm not sure! It should be. A lot of Huwai phone user folks complaining about intent features in the phone over the internet. We tested a lot of devices with this feature. It works fine with this feature. If it's possible Can you test with this on your google play service phone(other phones) as well? Thanks!

ghost commented 2 years ago

Correction: The bug only happens with a well-known App called "Librera Reader" : https://librera.mobi/

Other Apps as Anki work correctly with the "Search Function" of Kiwix. It might be an specific issue of the interaction between Kiwix and Librera Reader.

Unfortunately, the author of @LibreraReader (@foobnix) seems to be in Ukraine right now. Hopefully the author and his family is OK. Let's not close this issue for now on Kiwix. This might lead to some PR in the future. Thanks !

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

kelson42 commented 11 months ago

@gouri-panda @MohitMaliFtechiz can we do anything else?

gouri-panda commented 11 months ago

@kelson42 I tested with the Librea it doesn't work with our app. Librea works fine with other apps such as Dictionary and Google. So I think currently we don't register the intent that they are sending.

kelson42 commented 11 months ago

@gouri-panda Do you know which intent exactly? Can we fix it?

gouri-panda commented 11 months ago

I don't know yet. Yes, we can fix that.

kelson42 commented 7 months ago

@MohitMaliFtechiz What do you think about this feature request?

MohitMaliFtechiz commented 7 months ago

Other Apps as Anki work correctly with the "Search Function" of Kiwix. It might be an specific issue of the interaction between Kiwix and Librera Reader. @kelson42 I tested with the Librea it doesn't work with our app. Librea works fine with other apps such as Dictionary and Google.

@kelson42 We have this functionality in our application but as @gouri-panda said it is not working only with the Librea so it is a bug in our application and we should fix this.