Hi,
Am using TTNCF5 for my GPS application.
I get the current location of the user every 5 sec's. For this am using the following code.
private void getCurrentLocationDetails()
{
try
{
int result;
TTN.TError TError = new PPPTTCF5_2N2.TTN.TError();
TTN.TCurrentPositionInfo TCurpos = new PPPTTCF5_2N2.TTN.TCurrentPositionInfo();
// Start TTN before checking
if ((TTN.IsApplicationRunning(ref TError)) != 0)
{
txtLatitude.Text = "Raghuveer";
TTN.StartApplication();
}
result = TTN.GetCurrentPosition(ref TError, ref TCurpos);
if (result == 0)
{
if (TCurpos.eGpsStat == TTN.EGpsStatus.KGpsStateReceiving)
{
txtLatitude.Text = TCurpos.dLatitude.ToString();
txtLongitude.Text = TCurpos.dLongitude.ToString();
Console.WriteLine("Latitude = "+txtLatitude.Text);
Console.WriteLine("Longitude = "+txtLongitude.Text);
}
else
{
txtLatitude.Text = "0";
txtLongitude.Text = "0";
}
}
else
{
txtLatitude.Text = "0";
txtLongitude.Text = "0";
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
}
}
I have problem when i call "TTN.StartApplication();". I application cannot proceed from there and am not able to debug what the problem is.
The navigator is up and running and i have TTNCom.dll and TTSDK5Link.dll placed in the \windows folder of my mobile device. Is there something am missing in this?
Can anyone help me with this.
Presence