Issue
I stumbled upon this message recently, and I was pretty sure that this constructor wasn't deprecated in prior versions to 18.0.0, but I cannot find information anywhere that this one has been deprecated either.
And what should we use instead, is there another way to create a locationRequest
?
Solution
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);
Answered By - Kunu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.