Detect location of view Android -- 2
Budget: $130 – $180 USD
I need a developer to build similar mechanism of accessibility service like the quick translate function in the Hi Dictionary app (package com.talpa.translate https://play.google.com/store/apps/details?id=com.talpa.translate&hl=en&gl=US). Only mechanism/algorithm, no detailed layout or database needed: you will make a floating button that always draw over other app, register for accessibility service that listen to all package event and when we drag the floating button to the position of a certain view, we can detect the text in that view( it can be a textview, edit text or text in webpage in chrome browser). There are already accessibility api that allow us to get the event and content of view, for view location you may try getLocationOnScreen and display the annotation view accordingly.
So make sure you can get the text from both native app, chrome and app made with react native, flutter. There will be bonus if you can make this function: given that the floating button ends its dragging gesture in a view containg text that has content like “hello world this is android …” , detect which word is nearest to the position of that floating button. For example by eyes we see that the button is between the word “world” and the word “this”, and and it is closest to “world” then we would show a popup surrounding the bound of “world”
See my suggested repo : https://gitlab.com/stevek9/demo-accessibility
Screenshot https://drive.google.com/file/d/1CZ67PK7_12iC4nrIk-GB5bDBNnPn8J-e/view
Reference https://stackoverflow.com/questions/45423728/android-onaccessibilityevent-get-x-and-y-position-of-textview
So make sure you can get the text from both native app, chrome and app made with react native, flutter. There will be bonus if you can make this function: given that the floating button ends its dragging gesture in a view containg text that has content like “hello world this is android …” , detect which word is nearest to the position of that floating button. For example by eyes we see that the button is between the word “world” and the word “this”, and and it is closest to “world” then we would show a popup surrounding the bound of “world”
See my suggested repo : https://gitlab.com/stevek9/demo-accessibility
Screenshot https://drive.google.com/file/d/1CZ67PK7_12iC4nrIk-GB5bDBNnPn8J-e/view
Reference https://stackoverflow.com/questions/45423728/android-onaccessibilityevent-get-x-and-y-position-of-textview
Related categories:
Business, Accounting, Human Resources & Legal
Mobile App Development
Android
Kotlin