Custom URL scheme not working! Navigon AppInteract

It really upsets me. I used a document provided by Navigon himself. Unfortunately, it does not work properly. Navigon starts, but stops in the main menu.

All I do is:

NSString *myTestStr = [NSString stringWithFormat:@"navigon://App|Another place|FRA|75008|PARIS|rue de Turin|17|2.324621|48.881273"];

   NSString *navigonStrEsc = [myTestStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
   NSLog(@"navigonStr: %@", navigonStrEsc);
   [[UIApplication sharedApplication] openURL:[NSURL URLWithString:navigonStrEsc]];

Any ideas what is wrong with my path?

Many thanks!

0
source share
3 answers
Finally, I realized the right solution. The secret ingredients that the Navigon app has changed are latitude and longitude.

Use this custom URL scheme to pass the coordinates of the navigation destination (the transmitted coordinates must be on the loaded map): NAVIGON: // coordinate / YourAppName / longitude / latitude

: navigon://coordinate/NaviCard/19.084443/47.573305

+3

. : , , FRA , navigonFRA.

NSString* scheme = @"navigonFRA";
if ((![NavigonApplication isFRInstalled]) && [NavigonApplication isWorldInstalled])
    scheme = @"navigon";

NSString* urlAsString = nil;
urlAsString = [NSString stringWithFormat:@"%@://%@|%@|%@|%@|%@|%@|%@|%f|%f",
               scheme,
               @"myApp",            // Field1/AppName:Application or Company Name (e.g. AroundMe) 
               thePOI.name,         // Field2/NameOfPOI: Name of POI (e.g. Navigon AG Würzburg) 
               @"FRA",                  // Field3/Country: ISO 3166-1 alpha-3 code for country (http://unstats.un.org/unsd/methods/m49/m49alpha.htm) (e.g. DEU) 
               @"",                     // Field4/ZipCode: Postalcode, ZIP code of the POIs city (e.g. 97080) 
               thePOI.location.city,    // Field5/City: Name of POIs city (e.g. Würzburg) 
               thePOI.location.streetAddress,   // Field6/Street:POIs street name (e.g. Berliner Platz) 
               @"",                             // Field7/HouseNumber: POIs street/house number (e.g. 11) 
               thePOI.location.longitude,       // Field8/Longitude: Longitude in WGS84 (e.g. 9.870) 
               thePOI.location.latitude];       // Field9/Latitude: Latitude in WGS84 (e.g. 49.938) 

urlAsString = [urlAsString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"Starting Navigon app with %@", urlAsString);
NSURL*url = [[NSURL alloc] initWithString:urlAsString];
[[UIApplication sharedApplication ]openURL:url];
[url release];

. , navigon >= v1.5?

0

I found the problem, the first field (AppName) is very important.

Now the following html link works:

<a href="navigon://Safari|Some nice place||||||9.937156|49.800074">Some nice place</a>

For information: yesterday I called the support of the navigator, the woman who answered was helpless and terribly aggressive, I am now thinking about using TomTom :)

0
source

Source: https://habr.com/ru/post/1724254/


All Articles