glomadrian / material-animated-switch

A material Switch with icon animations and color transitions
1.18k stars 158 forks source link

how to run code if already online? #30

Open devhopes-ca opened 5 years ago

devhopes-ca commented 5 years ago

I have an app like uber. Lets assume that the rider has already requested a ride. Once the driver goes online, then the request is seen but if the rider doesn't request a ride until after the driver goes online, the request is not seen. Is there anything else I can do other than if online or if offline? I tried doing switch.isChecked() but nothing changed.