Getting location using hybrid location method.

This snippet will enable you to get the device location using hybrid method. It means the location data is given using the best method available at the moment - be it GPS or WiFi. In this example the current location of the device is taken whenever the location service changes its state to enabled.