abrenoch / hyperion-android-grabber

Screen grabber for hyperion
MIT License
194 stars 33 forks source link

slight delay in broadcasting grabber status on successful connection #66

Closed abrenoch closed 6 years ago

abrenoch commented 6 years ago

I'm not sure when this timing issue became a thing, but since the HyperionScreenEncoder and HyperionThread are both started independently, there is a chance that the screen recorder has not fully initialized when sending the grabber status back to the MainActivity (thus not showing the grabber as running). The timing of these events came down to a couple milliseconds within each other, so we may have just been lucky not seeing this happen until now. Adding that little bit more logic for the screen scale divisors probably made the difference.

Anyway, seemed like the easiest solution to this problem was to just add a slight delay before notifying the activity of the grabber status (on a successful connection). This seems to have negated the issue entirely for me.

Open to other ideas though.

abrenoch commented 6 years ago

Alright I have a better fix for this, will open a separate PR for it