Great Video - clear and easy to follow - Have three questions though 1] DeviceLocationMessage is not being referenced by anything - why? 2] Geolocation_LocationChanged seems to fire only once in the Start() 3] The Lat, Long values in MainPage.xaml seems to be updated only once and never refresh - maybe because of 2]? When will the Blazor Mapping video come out? Thx
Thanks for the great questions! Here are the answers: 1. You can add the reference like this: `WeakReferenceMessenger.Default.Send(new DeviceLocationMessage(deviceLocation));`. When listening, use `WeakReferenceMessenger.Default.Register(this, (sender, deviceLocation) => OnLocationChanged(deviceLocation.Value));`. Sorry for not including this correction in the video, but it will still work the way I implemented it. 2. The `LocationChanged` event triggers whenever the location changes. You'll see the values update if you're moving. I used an emulator in the video, so there were no value changes shown. 3. Same as point 2 - values should update with location changes in a real-world scenario. The Blazor Mapping video is on the way. Stay tuned!
@@CodingDroplets It would be great if you could combine this and show a map in the same MAUI app that could track the location of the device in real time - similar to how google maps work while driving but here to track while walking 🙂 Thx
Great question! In the video, I used a singleton service, but if you're asking about Android's background geolocation (tracking even when the app is closed), you'd typically need to implement a ForegroundService on Android for continuous location updates.
Can you check the GeolocationAccuracy and TimeSpan configured for GeolocationListeningRequest? In the video I've assigned TimeSpan.FromSeconds(1) to update every second.
You can check this out: github.com/dotnet/maui/issues/4670 I haven't tested it myself, but it might help with getting the unique device ID in .NET MAUI
🌟 Source Code: www.patreon.com/posts/109830171
🔗 MAUI Tutorial Series: ua-cam.com/play/PLzewa6pjbr3KKuUTp8ivXjcR4rvFvyoNw.html
nice class! thanks for share
You are most Welcome! Glad to hear that.
Great Video - clear and easy to follow - Have three questions though
1] DeviceLocationMessage is not being referenced by anything - why?
2] Geolocation_LocationChanged seems to fire only once in the Start()
3] The Lat, Long values in MainPage.xaml seems to be updated only once and never refresh - maybe because of 2]?
When will the Blazor Mapping video come out?
Thx
Thanks for the great questions! Here are the answers:
1. You can add the reference like this: `WeakReferenceMessenger.Default.Send(new DeviceLocationMessage(deviceLocation));`. When listening, use `WeakReferenceMessenger.Default.Register(this, (sender, deviceLocation) => OnLocationChanged(deviceLocation.Value));`. Sorry for not including this correction in the video, but it will still work the way I implemented it.
2. The `LocationChanged` event triggers whenever the location changes. You'll see the values update if you're moving. I used an emulator in the video, so there were no value changes shown.
3. Same as point 2 - values should update with location changes in a real-world scenario.
The Blazor Mapping video is on the way. Stay tuned!
@@CodingDroplets It would be great if you could combine this and show a map in the same MAUI app that could track the location of the device in real time - similar to how google maps work while driving but here to track while walking 🙂 Thx
@@CodingDroplets same as number 2 question it makes delay around 10 minutes to take new location
Hi
Does it support the background geolocation?
Great question! In the video, I used a singleton service, but if you're asking about Android's background geolocation (tracking even when the app is closed), you'd typically need to implement a ForegroundService on Android for continuous location updates.
@@CodingDroplets
Do you have any course about ForegroundService on Android for continuous location updates?
please put next video for live location tracker. thanks for your valuable time...
Already uploaded.
ua-cam.com/video/oprGTwdpDKk/v-deo.html
@@CodingDroplets thanks...
HI this is working but it delays around 2 mins. i think per distance?
Can you check the GeolocationAccuracy and TimeSpan configured for GeolocationListeningRequest? In the video I've assigned TimeSpan.FromSeconds(1) to update every second.
How to replace button with toggle ?
Thanks
To replace the button with a toggle in .NET MAUI, you can use a Switch control.
@@CodingDroplets
How to bind the toggle with viewmodel to act like what the button is doing ? Any sample code
Please make one project in .NET MAUI like a book summary app.
Thanks for the suggestion! I'll definitely consider creating a tutorial on that.
HOW TO GET unique device id for android in .NET MAUI
You can check this out: github.com/dotnet/maui/issues/4670
I haven't tested it myself, but it might help with getting the unique device ID in .NET MAUI
the ui dosent work
Have you implemented the WeakReferenceMessenger (as shown in the video) to notify the UI?
yea i think so,ill check