Closed dgalizzi closed 4 years ago
Hi @dgalizzi I see.. so headless plugin runs a background service, and you were trying to access hardware buttons in that service while there was no activity. Is that right?
Unfortunately, it isn't possible to use this plugin on headless due to 2 reasons.
We may have to guard ourselves for that crash, though.
Thanks!
Hi,
so headless plugin runs a background service, and you were trying to access hardware buttons in that service while there was no activity. Is that right?
That's exactly it. I want to run some code when volume buttons are pressed but the application on the background. Like some music apps allow you to go to the next song on the playlist by pressing the volume buttons while the phone is locked.
Thanks for your answer, I understand the issue.
Hello, Is it possible to access hardware buttons on headless? I'm getting null error on activity, found this issue on another repository which I believe is related:
https://github.com/transistorsoft/flutter_background_fetch/issues/11#issuecomment-462892194