Seamlessly switching to WiFi on Apple devices work because all iOS devices are connected to Apple servers. This however needs both devices to be Apple devices.
This cannot happen on Android automatically because of the differing manufacturers, and that they don't force you to use their services. For example, Google puts Hangouts on all Android devices. This would work like what you said on Apple devices. If you use Hangouts to SMS or call, then it can switch between mobile connections and wifi seamlessly. However, many people who own Android don't bother with Hangouts because there is already a phone and messaging app which the manufacturer places in the device. However these 2 apps don't work with wifi. Samsung has a service called ChatOn, which works likes Hangouts. But I couldn't for the life of me understand why they don't make it the default call and sms app, which would allow it to function they way you describe iMessage and calling on an Apple would.
Then there are third party apps like Viber, Whatsapp, Line, Wechat, Kik, etc, who provide the same service.