Giter Site home page Giter Site logo

Comments (18)

dashchak avatar dashchak commented on June 9, 2024

Hi @RapsusMTN,
I can not reproduce it in turn-by-turn-navigation(GuidanceApp) project.
I tried both Swift and Objective-C examples, as well as real device + Simulator.
Following callback gets triggered when new maneuver is available:

- (void)navigationManager:(nonnull NMANavigationManager*)navigationManager
           hasCurrentManeuver:(nullable NMAManeuver *)currentManeuver
                      nextManeuver:(nullable NMAManeuver *)nextManeuver
NS_SWIFT_NAME(navigationManager(_:didUpdateManeuvers:_:));

Which callback of NMANavigationManagerDelegate are you listening to?

Note, navigationManagerDidFindPosition is not called on position update. If tracking position updates needed, use NMAPositioningManager. Check this comment.

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

The language I am using is Swift, I am only implementing the NMAManagerDelegate protocol and calling different functions of it.
I am not using Notification Center may the problem be not using this?
Although it should also work only by calling the delegate?

Thanks!:)

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

You should not call functions of NMANavigationManagerDelegate Protocol. The idea is to pass your class object as a delegate to nav manager and implement nav manager protocol functions in your class. Those functions will be triggered once nav manager has some changes. Notification Center is not needed in this case.

The following steps should work:

  1. Download Guidance project
  2. Run "pod install".
  3. Open GuidanceApp.xcworkspace.
  4. Set your credentials in AppDelegate.swift (appId, appCode, licenseKey).
  5. Set your Bundle Identifier in Target Settings, General tab.
  6. Add breakpoint at showMessage("New maneuver is available") ( MainViewController:228)
  7. Run the app, press Start Navigation and select Simulation.
  8. Wait until app running stops on breakpoint.

Please share your sample code, if you have any questions.

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

Ok, I tried the example project and compared it with mine and the problem is in the following question:
When I create the NMARoutingMode object and enter the transportMode .bike parameter, the call to the delegate is not made, however if I enter it as a .car parameter, if it calls it, should I use another protocol to track the bike routes?
Thanks!

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

The protocol must be the same as for other transport types.
Indeed, I was able to reproduce it only with bike transport type.
Looking for root cause.
Thanks!

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

One more question.
Is there a lot of difference between changing the parameter from car to bike transport type?
Thanks!

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

Yes, there are roads forbidden for bikes but allowed for cars. And vice versa.
Thus creating route and its Navigation is done considering the transport mode.
Also, time to arrival will not be the same for different transport types.

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

Okay thank you, I still cannot make a simulated route with the bike parameter, I tried to reduce the simulation speed of the vehicle in case the one I had set was too high, but the NMANavigationManagerDelegate is not called, only with the car parameter.

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

Please make sure your license key has SDK-Navigation-Bike feature enabled.
Otherwise, bike navigation will not work as expected.

Check your console output for errors:

_obfuscated_checkLicenseKeys - Bike Navigation denied
[NMANavigationManager navigationErrorForRoute:] - ERROR: there is no authentication to use turn by turn navigation

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

Okey , How do I see if my license has permission to use bike navigation??
my navigation starts normally but the delegate is not called when entering the parameter .bike, and my console is clean!
Thanks!

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

Freemium Plan does not include SDK-Navigation-Bike feature.
If it is PRO, you can check feature list on https://developer.here.com
Or you can share you app_id and I can double check the feature list.

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

My app_ID is MH2cf8mztYGyJMC9Yrlm.

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

Unfortunately your feature list is missing SDK-Navigation-Bike. Looks like you have Freemium Plan features only.
For more features you need to switch to PRO plan.

By the way, startTurnByTurnNavigationWithRoute should return NMANavigationErrorOperationNotAllowed error code.

Thanks!

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

Ok, but I can't pay the premium without having tried the bike route functionality.
The error is not released by console Greetings

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

I understand. I will check if it is possible to included this feature in Freemium Plan by default.

Regarding NMANavigationErrorOperationNotAllowed error, I meant NSError as a return type:

- (nullable NSError *)startTurnByTurnNavigationWithRoute:(nonnull NMARoute*)route

For instance for prohibited Bike navigation:

NSError *error = [self.navigationManager startTurnByTurnNavigationWithRoute:self.route];
NSLog(@"%@", error);

Should output:
GuidanceApp[3920:799350] Error Domain=NMANavigationManager Code=9 "(null)"

Which is NMANavigationErrorOperationNotAllowed error. I will update Github samples to check for start navigation errors.

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

One more thing. Bike navigation does not start due to returned error, that's why you don't get callbacks. Voice guidance is off as well.
What's actually happens is just route simulation with mapTrackingEnabled.

Try to create one route, add it to map and use it for startTurnByTurnNavigationWithRoute. Whereas create another route(don't add it to the map) and pass it to dataSource.
As a result simulation will be done for second route which is not added to the map.

from here-ios-sdk-examples.

RapsusMTN avatar RapsusMTN commented on June 9, 2024

Perfect, I tried to capture the startTurnByTurn error and it doesn't throw any error when using bike as a parameter. So if you can check it would be appreciated, We are a company that we are dedicated to the bicycle sector and we would be interested in buying the premium to develop our mobile application. If you can provide us with this test feature, it would be perfect, because we will surely buy the premium.
Greetings

from here-ios-sdk-examples.

dashchak avatar dashchak commented on June 9, 2024

Regarding navigation error capture, please see my recent changes.

Bike navigation is beta feature and was not officially announced for all customers yet.
I created a request to HERE management to include it to Freemium Plan. I will notify you about the decision.

from here-ios-sdk-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.