Make use of deviceready function.