NoobDogg NoobDogg - 4 months ago 26
Android Question

Cannot use LocationCallback class

I want to override

onLocationAvailability()
from
LocationCallback
class
(com.google.android.gms.location.LocationCallback)
.

According to this doc,
LocationCallback
is an abstract class.

So I tried extending it, but I can't, nothing shows up in Android Studio.

I tried to implement it, as per this answer, but android studio doesn't allow it either.

Does anyone know how I can use this class so I can use
onLocationAvailability()
?

Answer

Try to add Google Play Services to your gradle file if you havn't done it

dependencies {
    compile 'com.google.android.gms:play-services:7.5.0'
}