Android Question Can I Use B4A to Develop a Screen Translator

xulihang

Well-Known Member
Licensed User
Longtime User
I've developed a browser extension for image translation with the help of AI: https://github.com/xulihang/imagetrans_chrome_extension. Now I want to create an Android version to translate the screen. Can I use B4A to develop such an app?

It needs to do the following:

1. Take a screenshot of the current screen.
2. Show the translation above another app via overlay or a dialog.
3. On-device OCR, translation, text removing and rendering with OpenCV and ONNXRuntime. (Optional to call a B4J server app for better performance)
4. Provide a translation API for the browser extension to use.

source-small.jpg
overlay-small.jpg
dialog-small.jpg
 
  • Like
Reactions: byz
Upvote 0
I think it would be much easier to use Google Lens for a B4X Mobile Project (in conjunction with Google translate API). Also Google Translate App for mobile phones already does this...

The solution with Google Lens would be as easy as:
1) Notify the user that you will open Google Lens App and that he should take the photo where the text appears and copy the text.
2) The user must get back to your app
3) Paste the text into your app or take it directly from the clipboard and use Google Translate API to translate it.

Also last time I checked Google Lens, it has also a translate button although I did not try it as I did not have any foreign text available around me.
 
Last edited:
Upvote 0
On-device model running with ONNXRuntime is better than Google Lens for my case, like manga translation.

Codex has proposed the ONNX runtime for a wake word, when I was searching for this matter.
 
Upvote 0
Back
Top