Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.25k stars 84 forks source link

Setting to suggest app names while typing #1014

Open summersab opened 1 month ago

summersab commented 1 month ago

Is your feature request related to a problem? Please describe. App names aren't recognized as words or shown as suggestions.

Describe the solution you'd like Much like the "Show Contact names" setting, it would be nice to have a setting to show app names as suggestions using the apps installed on the device. Maybe a setting could be added to specify user vs system apps - that could be helpful, as well.

Use case I often post on forums or GitHub regarding apps I have installed, but those app names aren't recognized as words or shown as suggestions. Some apps have odd names, so they aren't even recognized as words. This makes typing up things like bug reports and feature requests a little cumbersome.

Describe alternatives you've considered (if any) It is certainly possible to just add app names to the dictionary or just type them enough with "Personalized suggestions" enabled so that the keyboard remembers them. However, it would be nice to have a setting so the app names are suggested by default when enabled.

Helium314 commented 3 weeks ago

Technically possible, but as far as I understand on Android 11 you will only get a limited selection of apps. Further, the list needs to be filtered somehow, as (on my Lineage 17 phone) it returns words like com.android.wallpapercropper, Rounded, Media Storage, Phone, and others you might not want in suggestions.

If someone wants to try filtering, or what happens on newer Android versions:

val p = context.packageManager.getInstalledApplications(0)
Log.i("applog", "${p.map { context.packageManager.getApplicationLabel(it) }}")

Note that getting all the labels is quite slow, took 1.7s on my test phone.