android / platform-samples

A collection of samples of different Android OS platform APIs.
https://developer.android.com/about
Apache License 2.0
1.16k stars 251 forks source link

[Bug]: Smart Watch with Wear OS can't receive location updates, after disconnecting by BLE from paired Smartphone #183

Closed arstagaev closed 3 months ago

arstagaev commented 4 months ago

Is there an existing issue for this?

In which area is the issue?

Location

In a specific sample?

No response

What happened?

Smart Watch (SW) with Wear OS can't receive location updates, after disconnecting by BLE from paired Smartphone. But SW already has GPS, why watches can't use this feature separately from smartphone? Or how I can implement this feature (receiving GPS updates, when we don't have BLE connection with paired smartphone)?

I've used FusedLocationProviderClient from lib (com.google.android.gms:play-services-location:21.3.0), with following parameters:

 val locationRequest = LocationRequest.Builder(1_500L).apply {
            setMaxUpdateAgeMillis(3_000L )
            setMinUpdateIntervalMillis(1_000L ) 
            setIntervalMillis(1_500L ) 
            setPriority(Priority.PRIORITY_BALANCED_POWER_ACCURACY )
        }.build()

and after that was installed standard LocationCallback.

Relevant logcat output

No response

Code of Conduct

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.