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

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -