Coffee icon indicating copy to clipboard operation
Coffee copied to clipboard

Stops working as assistant app

Open secretServant opened this issue 1 year ago • 3 comments

I think coffee is causing the bug because I haven't ran into it while using other assistant apps. Please let me know if there's a logged event you'd be looking for to reproduce the bug. The bug occurs after couple of hours of being set as the default assistant app.

Steps to reproduce the behavior:

  1. Select as default assistant app.
  2. Use gestures to activate/deactivate coffee.
  3. Works initially, indicated by toast & notification.
  4. Assistant gesture still flashes the screen but toast & notification don't occur.
  5. Only way to get coffee to work as assistant again is to deselect/reselect it as default assistant app.

Additional context

  • Device: Lineage OS
  • Android version: 13

secretServant avatar Dec 29 '23 12:12 secretServant

Is result code -92 expected? Checking the logs when it doesn't launch properly yields the following: ActivityTaskManager(1748): START u0 {act=android.intent.action.ASSIST flg=0x10000000 cmp=com.github.muellerma.coffee/.InteractionService (has extras)} with LAUNCH_MULTIPLE from uid 10361 result code=-92

secretServant avatar Jan 08 '24 19:01 secretServant

I'm able to reproduce the bug whenever I restart my device (without the arbitrary wait time). If coffee is set as assistant it never works via assistant calls upon restart. Only way to make it work as assistant app again is setting assistant to another app/none, then setting it as coffee again.

secretServant avatar Jan 08 '24 20:01 secretServant

When I implemented this feature I didn't find a lot of documentation for this. It worked on my device, but after an update it didn't work at all. I didn't spend a lot of time in fixing it, but I'd review PRs improving the situation.

mueller-ma avatar Jan 09 '24 17:01 mueller-ma