Tag: mock

2020.09.01.

Xamarin.Forms – Mock Locations

This Project you can find at: https://github.com/officialdoniald/Xamarin.Forms.MockLocation. Download my NuGet Package: NuGet Gallery | Xamarin.MockLocationPlugin 1.0.0 Android: First, we have to request permissions in the Manifest and in the MainActivity (Runtime). Manifest: https://github.com/officialdoniald/Xamarin.Forms.MockLocation/blob/master/Xamarin.Forms.MockLocation.Mobile/Xamarin.Forms.MockLocation.Mobile.Android/Properties/AndroidManifest.xml MainActivity: https://github.com/officialdoniald/Xamarin.Forms.MockLocation/blob/master/Xamarin.Forms.MockLocation.Mobile/Xamarin.Forms.MockLocation.Mobile.Android/MainActivity.cs Sending mock lockation from Standard Library: DependencyService.Get().SendMockLocation(new IMockLocationPlugin.MockPosition() { Longitude = 24.234234, Latitude = 46.3213123, Accuracy = 1.0f, Altitude = 15, Bearing = 5f, Speed = 50f }); Deploy your […]