Google added the ability to take screenshots in Android with Ice Cream Sandwich back in 2011. However, recording on-screen content natively was not possible and even many rooted apps failed to work properly, even though they promised otherwise.
Thankfully, with Android 4.4 KitKat, Google has added the ability to natively record on-screen content without any kind of hackery.