1

I have a web application that needs to open a destination in the native maps/navigation app on the device. On most Android devices this is google maps, and I can simply open a link that will open google maps with the directions to the passed destination (latitude, longitude coordinates). In the case of the TomTom Pro 8375, there seems to be no way of opening a destination in the navigator app from the browser.

We have tried this, amongst others, with the following:

  1.   tomtomgo://x-callback-url/navigate?destination=52.371183,4.892504
    
  2.   tomtomhome://geo:action=navigateto&lat=mylat&long=mylon&name=myname
    

Are there any known workarounds to achieve this? I have received this as a response from the support but this applies only for kotlin or java.

Uri gmmIntentUri = Uri.parse("google.navigation:q=52.0000,12.0000");

Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);

startActivity(mapIntent)

Is there a way that I can make this work in Javascript ?

I would really appreciate any suggestions!

Thank you!

Tudor
  • 31
  • 3

1 Answers1

0

Too Long to be a comment

Not overly familiar with webapps however we do have 3 apps with Webfleet. Sadly we use Java not Javascript. And the intent we use is

String uri = "geo:0,0?q=" + <destination>;
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(uri)));

Not overly helpful for you however we must support both phones and the Pro tablets.

The format below is the standard for JavaScript ?

intent:
   HOST/URI-path // Optional host 
   #Intent; 
      package=[string]; 
      action=[string]; 
      category=[string]; 
      component=[string]; 
      scheme=[string]; 
   end; 

Which i would give you a rough estimate of:

intent://#Intent;action=android.intent.action.PICK;type=text/plain;S.android.intent.extra.TEXT=geo:0,0?q=52.0000,12.0000;end

I will also add the App that is Webfleets version of maps is called NavPadNavAppActivity, can try targeting that directly?

Scott Johnson
  • 707
  • 5
  • 13
  • Thank you for answering TDIScott! The format mentioned is not standard Javascript but I will try to use your rough estimated mention inside an anchor tag as href. You mean by adding the NavPadNavAppActivity before #Intent ? – Tudor Mar 10 '21 at 13:13
  • I snagged it from: https://paul.kinlan.me/launch-app-from-web-with-fallback/ Anywho, let me check the Manifest of NavPad and try to see what filters it has – Scott Johnson Mar 11 '21 at 09:14
  • Wait, on the webfleet Dev Documentation (https://www.webfleet.com/en_gb/webfleet/partners/integration/developer-resources/) Grab the PDF of "Pro 8 Driver Terminal Developer Documentation" Pop to page 22 and the system intents are listed there, along with the example commands via adb So it would be something like: `Open Map` – Scott Johnson Mar 11 '21 at 09:51
  • When I try to open any href with intent and even following the examples I always get back – Tudor Mar 15 '21 at 18:12