Why does using Voice Control when a Xamarin.Forms Picker is open result in the app terminating?

John Hardman 261 Reputation points
2020-11-26T18:59:58.46+00:00

With a Xamarin.Forms Picker open on iOS (so the wheels are usable) when using the Voice Control accessibility option, the app is prone to crashing. A wide variety of spoken words or phrases will result in the app crashing, "Next", "Thank you" (ok, I was saying that to somebody in the room), etc.

Has anybody else experienced this? Any idea how to prevent the crash from happening?

I'm using XF 4.8

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,355 questions
{count} votes

1 answer

Sort by: Most helpful
  1. John Hardman 261 Reputation points
    2020-11-27T11:52:28.637+00:00

    where PhoneticAlphabetVM is as follows:

    public sealed class PhoneticAlphabetVM
    {
        private readonly ObservableCollection<string> _letters = new ObservableCollection<string>
        {
            "alpha",
            "bravo",
            "charlie",
            "delta",
            "echo",
            "foxtrot",
            "golf",
            "hotel",
            "india",
            "juliet",
            "kilo",
            "lima",
            "mike",
            "november",
            "oscar",
            "papa",
            "quebec",
            "romeo",
            "sierra",
            "tango",
            "uniform"
        };
    
        public void AddItem(string newItem)
        {
            _letters.Add(newItem);
        }
    
        public void ModifyItem()
        {
            _letters[0] = _letters[0] + "*";
        }
    
        public IEnumerable ItemsSource => _letters;
    }
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.