Yes, the LocationRequest constructor is deprecated. You can use its static method LocationRequest.create() to create a location request.

Kotlin:

locationRequest = LocationRequest.create().apply {
    interval = 100
    fastestInterval = 50
    priority = LocationRequest.PRIORITY_HIGH_ACCURACY
    maxWaitTime = 100
}

Java:

locationRequest = LocationRequest.create()
    .setInterval(100)
    .setFastestInterval(3000) 
    .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)
    .setMaxWaitTime(100);

Update

As @Shimon pointed out LocationRequest.PRIORITY_HIGH_ACCURACY is now deprecated, so instead use Priority.PRIORITY_HIGH_ACCURACY

Answer from Kunu on Stack Overflow
🌐
Medium
tomas-repcik.medium.com › locationrequest-create-got-deprecated-how-to-fix-it-e4f814138764
LocationRequest.create() got deprecated. How to fix it? | by Tomáš Repčík | Medium
October 30, 2022 - Location services were updated to version 21.0.0, and the LocationRequest.create was deprecated with the new update. The changes occurred at 13.
🌐
GitHub
github.com › Baseflow › flutter-geolocator › issues › 1206
LocationRequest deprecated · Issue #1206 · Baseflow/flutter-geolocator
January 31, 2023 - ...\Pub\Cache\hosted\pub.dartlang.org\geolocator_android-4.1.7\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:86: warning: [deprecation] create( ) in LocationRequest has been deprecated LocationRequest locationRequest = LocationRequest.create(); ^ ...\Pub\Cache\hosted\pub.dartlang.org\geolocator_android-4.1.7\android\src\main\java\com\baseflow\geolocator\location\FusedLocationClient.java:89: warning: [deprecation] setPrio rity(int) in LocationRequest has been deprecated locationRequest.setPriority(toPriority(options.getAccuracy())); ^ ...\Pub\Cache\hosted\pub.d
Author   Baseflow
🌐
Tomasrepcik
tomasrepcik.dev › blog › 2022 › 2022-10-30-location-request-deprecated
LocationRequest.create() got deprecated. How to fix it?
October 30, 2022 - Here is how to change LocationRequest.create to recommended LocationRequest.Builder: // DEPRECATED // LocationRequest.create().apply { // interval = timeInterval // smallestDisplacement = minimalDistance // priority = LocationRequest.PRIORITY_HIGH_ACCURACY // } // New builder LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, timeInterval).apply { setMinUpdateDistanceMeters(minimalDistance) setGranularity(Granularity.GRANULARITY_PERMISSION_LEVEL) setWaitForAccurateLocation(true) }.build()
🌐
GitHub
github.com › google › ground-android › issues › 2969
LocationRequest is deprecated · Issue #2969 · google/ground-android
January 2, 2025 - LocationRequest is deprecated#2969 · #2970 · Copy link · Assignees · anandwana001 · opened · on Jan 2, 2025 · Issue body actions · No description provided. Reactions are currently unavailable · anandwana001 · No labels · No labels ...
Author   google
Find elsewhere
🌐
GitHub
gist.github.com › Foxpace › 94e720e7f5d3d0430f8c07b852bbdc01
Deprecated LocationRequest.create and new Builder · GitHub
Deprecated LocationRequest.create and new Builder. GitHub Gist: instantly share code, notes, and snippets.
🌐
Google
android.googlesource.com › platform › frameworks › base › + › 4e31c4fffbc42b4c2b5dca6431cfeef9e078f5b4^!
Diff - 4e31c4fffbc42b4c2b5dca6431cfeef9e078f5b4^! - platform/frameworks/base - Git at Google
+ * + * <p>As a result of this change, the {@link LocationProvider} and + * {@link Criteria} classes have been deprecated, in favor of + * {@link LocationRequest}. Furthermore, all Location Manager + * methods involving Criteria or explicitly named Providers have + * been deprecated, in favor ...
🌐
Android Developers
developer.android.com › api reference › locationrequest
LocationRequest | API reference | Android Developers
Skip to main content · English · Deutsch · Español – América Latina · Français · Indonesia · Polski · Português – Brasil · Tiếng Việt · 中文 – 简体
🌐
Stack Overflow
stackoverflow.com › tags › google-location-services › hot
Hottest 'google-location-services' Answers - Stack Overflow
Yes, the LocationRequest constructor is deprecated. You can use its static method LocationRequest.create() to create a location request.
🌐
Android Developers
developer.android.com › api reference › locationrequest.builder
LocationRequest.Builder | API reference | Android Developers
Skip to main content · English · Deutsch · Español – América Latina · Français · Indonesia · Polski · Português – Brasil · Tiếng Việt · 中文 – 简体
🌐
GitHub
github.com › ionic-team › capacitor-plugins › issues › 790
LocationRequest() deprecated · Issue #790 · ionic-team/capacitor-plugins
Bug Report Plugin(s) geolocation Capacitor Version 3.x Platform(s) android Current Behavior LocationRequest() constructor is deprecated, switch to LocationRequest.create() Expected Behavior Code Reproduction Other Technical Details Addit...
Author   ionic-team