There are two button methods as below:
private void Start_Clicked(object sender, EventArgs e)
{
try
{
_speechRecongnitionInstance.StartSpeechToText();
}
catch (Exception ex)
{
input.Text = ex.Message;
}
if (Device.RuntimePlatform == Device.iOS)
{
start.IsEnabled = false;
}
}
private void Submit_Clicked(object Sender, EventArgs args)
{
var input_text = input.Text;
webapicall(input_text).Wait();
output.Text = output_text;
CrossTextToSpeech.Current.Speak(output_text);
LogTable ld = new LogTable
{
Username = username,
Question = input_text,
Answer = output_text,
Timestamp = DateTime.Now.ToString()
};
int i = App.Database.SaveItem(ld);
}
How to I call second method from first method?
I tried but I am facing problem, without executing first method, second method is invoked.