-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliability #30
Comments
While bugs are a possibility, the "catch up" is mainly Android deprioritizing the app, buffering its network requests, and then dispatching them all at once. Linux doesn't have any sense of "real-time UDP" (or for that matter, real-time anything), and understandably, the system prefers to buffer small packets. Early on, it was a major issue preventing anything close to a synchronized show. The app stopping after a while seems to be an Android 8.0 issue. Oreo got a lot more aggressive about battery protection, and so running a service has become a little more challenging. I think the actual problem is the connection between Spotify and Music Blitz is what's stopped; Music Blitz relies on getting broadcast messages from Spotify for play/pause events, so if the system decides that message receiver isn't relevant any longer, then Music Blitz stops. This is an even bigger problem when playing Spotify on a different device. Android will continue to dispatch the broadcasts for a while, but then I think the Spotify service that's handling it gets cut off. In short, there are a lot of variables, and not a real way to debug it. I haven't necessarily found a deterministic set of conditions to predict when it'll stop getting notifications. My main hope is to develop in a direction to remove the Spotify dependence all together. There's a lot of great data that they make available, but it limits the app in these other directions. |
Yup, I feared that's the case. There might be a way to coax Android 8.0 into allowing the service as a high priority even with the screen off, I know several other apps have done that. It requires you to keep a notification that's happening (or manually allow the app under settings to not be battery-optimized) but it might work. Worth looking into. Is the service currently being ran as a foreground service? |
The lights service itself (which handles dispatching messages to the bulbs) is started (in Oreo) with |
Stock Android 8.0 - App works great but over time always dies / stops changing colors. On occasion I also get "rubberbanding"....lights stop changing for a few seconds and then all of a sudden "catch up", flashing all the transitions they would have.
I suspect Android may be trying to kill the service (or there may be a bug somewhere) or heck maybe network but my lights are in the same room as the router and it's a nice router.
The text was updated successfully, but these errors were encountered: