google api - how to use android Fuse api to get location -


how can use android google api find current location? used code:

googleapiclient googleapiclient = new googleapiclient.builder(this)             .enableautomanage(this, 0 , this)             .addconnectioncallbacks(this)             .addonconnectionfailedlistener(this)             .build(); locationservices.fusedlocationapi.getlastlocation(googleapiclient); 

but doesn't work. wrong?

you have forgotten put line:

googleapiclient.addapi(locationservices.api) 

Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -