Skip to content
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

First attempt to run an action fails #5

Open
timothyb89 opened this issue May 29, 2014 · 1 comment
Open

First attempt to run an action fails #5

timothyb89 opened this issue May 29, 2014 · 1 comment
Assignees
Labels

Comments

@timothyb89
Copy link
Owner

The first attempt to run an action when the service is "cold started" always seems to fail. For example, a simple "power on" task will do nothing when first executed, but when tried again, works fine.

Not sure why this happens. According to the log, FireReceiver is never run by Tasker, but for some reason LIFXService starts and begins bulb discovery. Seems like some sort of Android bug? A misconfiguration somewhere?

@timothyb89 timothyb89 added the bug label May 29, 2014
@timothyb89 timothyb89 self-assigned this May 29, 2014
@timothyb89
Copy link
Owner Author

After some investigation, this seems to be some Android bug or some such.

When ReceiverService attempt to create a connection to LIFXService via bindService(), LIFXService reliably starts without any trouble, but sometimes (usually on the first run) the ServiceConnection never has its onServiceConnected() method called. For whatever reason this doesn't occur when LIFXService is already loaded and running.

The current workaround (added in 148d24c) is to keep trying to run bindService until it works. This seems to solve the issue but is ... less than ideal, to say the least. I'm keeping this open for now in hopes that I can properly solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant