小编DeB*_*kIt的帖子

Requesting location updates using FusedLocationProviderClient is not working, callback is never called

I'm trying to use Firebase Cloud Messaging to send a command to my Android app that prompts it to determine its current location. This is done in the class FCMService.

The class SingleShotLocationProvider then performs the actual work by requesting location updates using the FusedLocationProviderClient. However, the callback fusedTrackerCallback is never called ever, although the necessary permissions are granted and GPS is switched on. Why?

FCMService class

public class FCMService extends FirebaseMessagingService {

    @Override
    public void onMessageReceived(RemoteMessage …
Run Code Online (Sandbox Code Playgroud)

java gps android location fusedlocationproviderclient

3
推荐指数
1
解决办法
5291
查看次数