Stypox / dicio-android

Dicio assistant app for Android
GNU General Public License v3.0
644 stars 63 forks source link

modify a function. #180

Closed MakeMeCookie closed 1 year ago

MakeMeCookie commented 1 year ago

Pressing the Home button turns on the dicio app and plays log: 'Voskinput device(dicio): starting recorder'. However, when I press the Home key, I want to run it like the file 'https://github.com/Stypox/dicio-android/pull/109' 'dialog_stt_service.xml'. Which file should I modify?

If you tell me which file I should modify, I will try it myself.

Stypox commented 1 year ago

The relevant code is in MainActivity. You can remove lines 102-103 (so that the button doesn't trigger assistance anymore) and then set a click listener to voiceFab right below line 97. Such listener should run the same code as line 189 to open the stt service activity. Or, for even faster opening, you could just put that line in the onCreate and skip the whole app altogether, leading directly to the stt service. I hope this is clear enough!

Note that it's planned to allow users to add a launcher shortcut leading directly to the stt service.