Started programming in Android and i seem to have problems with having something running continuously in the background.
This is the code that i have in MainActivity
async Task task()
var locator = CrossGeolocator.Current;
locator.DesiredAccuracy = 50;
var position = await locator.GetPositionAsync(timeoutMilliseconds: 10000);
var speed = position.Speed * 3.6;
speedKmh = speed.ToString() + "km/h";
i want it to start at the beginning of the application and basically run it every 1 second so i can display the device's speed using GPS.It must be really simple but i just don't know how.