PPP Forum

Information and discussions about our products
Welcome to PPP Forum Sign in | Join | Help
in Search

Breaking changes: our new Navigation solution partner is Sygic

From TomTom to Sygic:
Over the years our former navigation provider reduced his SDK more and more to drive his own business solutions.
Finally a SDK is no longer available!
Looking for an alternative solution we found www.sygic.com/tomtom-sdk.
Why we recommend Sygic:
  • Good support at first hand
  • A modern Navigation Solution (with actual maps)
  • Native .NET support in the SDK (no need for third party solutions)
  • Many operating systems support including Linux and Android
  • A partner which is even able to adapt the Navigation solution to your needs.

Help Getting Started

Last post 10-27-2005, 13:09 by ManniAT. 9 replies.
Sort Posts: Previous Next
  •  10-26-2005, 17:06 210

    Help Getting Started

    Hi,

    Im just starting with TTNCF, i have version PPPTTCF5_1.dll and PPPTT5Helper.dll , TomTom v5

    This is what ive done

    Sample App  with 1 form

     

    Imports PPPTTCF5_1
    Imports System.Runtime.InteropServices

    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim te As TTN.TError = New TTN.TError()

    Dim ttLoc As TTN.TCurrentPositionInfo = New TTN.TCurrentPositionInfo()

    Cursor.Current = Cursors.WaitCursor

    Label1.Text = TTN.GetCurrentPosition(te, ttLoc).ToString()

    MessageBox.Show(te.nError.ToString())

    Label2.Text = ttLoc.nSpeedKMh.ToString() + " / " + ttLoc.nDirection.ToString()

    If (ttLoc.eGpsStat = TTN.EGpsStatus.KGpsStateGeneralError) Then

    Label3.Text = "GPS - Error"

    ElseIf (ttLoc.eGpsStat = TTN.EGpsStatus.KGpsStateReceiving) Then

    Label3.Text = "GPS - Receiving"

    ElseIf (ttLoc.eGpsStat = TTN.EGpsStatus.KGpsStateGeneral) Then

    Label3.Text = "GPS - General"

    Else

    Label3.Text = ttLoc.eGpsStat.ToString

    Label3.Text = ttLoc.dLongitude.ToString & " " & ttLoc.dLatitude.ToString()

    End If

    End Sub

    My Problem occurs on the for load 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    >>>>>>>>>>   Fails Here>>>>>>>  TTN.StartApplication()

    TTN.BringNavigatorToForeground()

    End Sub

    the error message im getting when the for loads  is:

    An unhandled exception of type 'System.MissingMethodException' occurred in PPPTTCF5_1.dll

    Additional information: Can't find PInvoke DLL 'PPPTT5Helper.DLL'.

    I have referenced .dll in references. and ive added the hellper.dll to my application using add existing items.

    could you please tell where im going wrong

    Thnks

    John McCaffery

     

     

     

  •  10-26-2005, 17:37 211 in reply to 210

    Re: Help Getting Started

    Hi John,

    could you check the application dir (from your app) on your device if the PPPTT5Helper.dll is there.
    The error message sounds exaclty as if this is not the fact.

    If this is not the fact you should check in VS if in the properites of the included PPPTT5Helper.dll
    show - Build Action: Content.

    By the way - your code looks good Smile [:)].
    I'm a C# developer but when I see your code it shows me that you could place "Option strict" without any errors.
    No "auto conversion", no "default properties" - nothing of the "bad old VB things kept for compatibility".

    Regards

    Manfred

  •  10-27-2005, 10:50 212 in reply to 211

    Re: Help Getting Started

    Hi Manfred,

    Thanks for the reply, your solution solved my problem, but........

    now i have another , when exiting my app tomtom is not exiting and if i close it in task manager tomtom becomes unusable and i have to hard reboot  and reinstall, any suggestions?

    John

  •  10-27-2005, 10:59 213 in reply to 212

    Re: Help Getting Started

    Hi John,

    why should TTN quit just because your app does?

    Imagine your app is a "find in database and navigate to" thing.
    Your app starts - the user chooses a record from the DB - your app tells TTN to route to and exits.
    And now TTN would also quit - not a good idea.

    Therefore you have to tell TTN what to do  - take a look at "QuitApplication".

    Regards

    Manfred

  •  10-27-2005, 11:21 214 in reply to 213

    Big Smile [:D] Re: Help Getting Started

    Manfred you must be a mind reader you got my app almost spot on :D,

    This is what i want to do exactly......

    1, my app gets sent list of addresses from Desktop app via webservice.

    2, mobile user selects address and tells tomtom to navigate to.

    3, when TT has reached destination i want TT to bring my app back to foreground

    4, user dose some work on my app sends data back to Desktop app again via webservice

    5, user selects next address and repeats steps 2,3,4 untill all addresses have been navigated to

    6, user closes my app and i want TT to close aswell

    What are the best steps to take when interacting with TT to acomplish this ie what functions etc, all the data transfer stuff from my app is writen and works fine over gprs.

    The reson I'm asking for instruction is because im under time constraints ie i have to show a working build to my boss tomorow.

    your expertise is greatly appreciated.

    John

  •  10-27-2005, 11:38 215 in reply to 214

    Re: Help Getting Started

    Hi John,

    although most of the things are common tasks - and exeed support - I'll try to help you.
    I'll write my answer in bold inbetween your lines - and I assume (as you wrote) that communication allready works.

     John McCaffery wrote:

    Manfred you must be a mind reader you got my app almost spot on :D,

    This is what i want to do exactly......

    1, my app gets sent list of addresses from Desktop app via webservice.

    2, mobile user selects address and tells tomtom to navigate to.
    Use navigatetoaddress or navigatetocoordinates - depending on the data you have.

    3, when TT has reached destination i want TT to bring my app back to foreground
    This is difficult - since TTN has no event "destination reached".
    But you could freuquently call GetRouteInformation and react on very short distances to destination.
    Beware of the fact that the user might never reach the destination - since he finds a parking place a litte away from the destination.
    So if he is "near" use FlashMessage to thell the user that after reaching the destination he should press an item in the menu.

    Create a menu item with a command that is handled in your app (and brings it to foreground...).
    Create a cap file to include this menu item - and (maybe) also a menu file to have your icon on the first screen.
    >>Information about those files you will find in the SDK documentation.

    4, user dose some work on my app sends data back to Desktop app again via webservice

    5, user selects next address and repeats steps 2,3,4 untill all addresses have been navigated to
    You simply go on at step 2.

    6, user closes my app and i want TT to close aswell
    Insert "QuitApplication" in your main form's close handler.

    What are the best steps to take when interacting with TT to acomplish this ie what functions etc, all the data transfer stuff from my app is writen and works fine over gprs.

    The reson I'm asking for instruction is because im under time constraints ie i have to show a working build to my boss tomorow.

    your expertise is greatly appreciated.

    John

    HTH

    Manfred

  •  10-27-2005, 12:14 216 in reply to 215

    Re: Help Getting Started

    Manfred again thanks for your exellent response, probably the best support ive had from any component supplier.

    you have almost filled in the gaps there i only 1 more thing i don't quite understand?

    Ive looked in the SDK docs and i think i can create the cap file and i understand the cmd i specify will be passed back to my app but the bit i dont understand is how to handle this event in my app, i dont understand the sample code in the SDK because its in C++ it may as well be in Japanees because i dont understand that either, if it was C# i would almost understand it and could convert it to VB.net.

    Manfred i hate to keep pestering you but if you would be so good to tell me how to handle the returned call in my app i should have this thing cracked. C# will do VB would be better.

    Again thanks in advance. 

    John

  •  10-27-2005, 12:31 217 in reply to 216

    Re: Help Getting Started

    Hi John,

    the third post of this thread http://forums.pp-p.com/forums/45/ShowPost.aspx shows how to handle a command
    including a sample cap file. Of course it is C# - but with your VB style this should be no problem.

    By the way - with the search field abouve this could have been found via <command and handler> Smile [:)]

    I hope this helps you out of trouble

    Manfred

  •  10-27-2005, 13:00 218 in reply to 217

    Re: Help Getting Started

    Manfred your a star i've got all the info that i need i hope :), if you were in Scotland id take you for beer,

    regards

    John

  •  10-27-2005, 13:09 219 in reply to 218

    Re: Help Getting Started

    Hi John,

    prepare the money for the bear - one of our chair men is at the moment in Aberdeen - and I think sometimes we will give him a visit...
    ....and get the bear on this way Beer [B]

    Regards

    Manfred

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems