In my code there is an inner class that extends BroadcastReceiver.
And I have added the following line to the AndroidManifest.xml:
This is what worked for me:
public class OuterClass {
public static class InnerStaticClass extends BroadcastReceiver {
@Override
public void onReceive(final Context context, final Intent intent) {
final Location location = (Location) intent.getExtras().get(LocationClient.KEY_LOCATION_CHANGED);
}
}
}
AndroidManifest.xml: