android - Why does FusedLoactionProvider.getLocationAvailability() return null (while it should not)? -


in initiate google play services client this:

public class myapplication  extends application implements googleapiclient.connectioncallbacks, googleapiclient.onconnectionfailedlistener      protected synchronized googleapiclient buildgoogleapiclient() {         return new googleapiclient.builder(this)             .addconnectioncallbacks(this)             .addonconnectionfailedlistener(this)             .addapi(locationservices.api)             .build();     }       /* googleapiclient.connectioncallbacks */     @override     public void onconnected(bundle bundle) {         log.v(tag, "google play services connected.");         boolean isconnected = mgoogleapiclient.isconnected();    // - true         boolean islocavailable = locationservices.fusedlocationapi.getlocationavailability(mgoogleapiclient).islocationavailable();         // causes nullpointerexception because getlocationavailabality() returns null. why ????         .         .         .     }  } 

google play services library version rev.24. why null pointer eception occuring? google api client initialized, connected, should per documentation? wifi connection exists...

are still have problem? it's work on app (run on moto x 2013) google play service libary rev 25

but got null when tested on genymotion emulator installed google apps. have open google app google maps google play service updated before test app. worked.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -