You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested the code presented in Chapter 4 on Android 10 and it does not work properly. When I press New button in toolbar, NewDetail page is opened but it stuck. The problem causes the following function:
public override async void Init()
{
try
{
var coords = await _locService.GetGeoCoordinatesAsync();
Latitude = coords.Latitude;
Longitude = coords.Longitude;
}
catch (Exception)
{
// TODO: handle exceptions from location service
}
}
The _locService.GetGeoCoordinatesAsync() method is executed properly but after that Latitude and
Longitude properties start updating infinitely which causing unresponsiveness. I do not understand why OnPropertyChanged() event is called infinitely. If I remove both properties then app works fine.
Update:
I spend some time on this problem and I think that I figure out what was the cause of the problem. By default, I use the Slovenian language and we write decimal numbers with a comma and not with a dot. if I change the language to English then everything works fine. To solve this problem, I think that I have to apply some kind of culture to appropriate binding. I will appreciate any kind of help.
The text was updated successfully, but these errors were encountered:
I tested the code presented in Chapter 4 on Android 10 and it does not work properly. When I press New button in toolbar, NewDetail page is opened but it stuck. The problem causes the following function:
public override async void Init()
{
try
{
var coords = await _locService.GetGeoCoordinatesAsync();
Latitude = coords.Latitude;
Longitude = coords.Longitude;
}
catch (Exception)
{
// TODO: handle exceptions from location service
}
}
The _locService.GetGeoCoordinatesAsync() method is executed properly but after that Latitude and
Longitude properties start updating infinitely which causing unresponsiveness. I do not understand why OnPropertyChanged() event is called infinitely. If I remove both properties then app works fine.
Update:
I spend some time on this problem and I think that I figure out what was the cause of the problem. By default, I use the Slovenian language and we write decimal numbers with a comma and not with a dot. if I change the language to English then everything works fine. To solve this problem, I think that I have to apply some kind of culture to appropriate binding. I will appreciate any kind of help.
The text was updated successfully, but these errors were encountered: