here-android-sdk-examples icon indicating copy to clipboard operation
here-android-sdk-examples copied to clipboard

Only receiving the first few instruction events during route simulation

Open aardvarkk opened this issue 4 years ago • 2 comments

Describe the bug

When I simulate a route, I only receive a few "new instruction event" callbacks and then they stop firing despite the route simulation continuing as normal.

Steps To Reproduce Steps to reproduce the behavior:

  1. Start a simulated route
  2. After a variable amount of time, new instruction callbacks stop being received

Expected behavior New instruction callbacks should be fired for every turn along the route

Smartphone (please complete the following information):

  • Device: PDA
  • OS: Android 9
  • SDK Version: 3.17.2.132 (Premium Edition)

Additional context It seems like it's somehow time-related. It's variable -- sometimes I'll get the first 3 instructions, sometimes 4. I increased the speed of the simulated route and got an additional instruction along the path I hadn't yet received, so it's almost like I get about 10 seconds or so of new instruction events before they stop completely. I'm not seeing any errors popping up indicating any kind of problem.

aardvarkk avatar Jan 22 '21 20:01 aardvarkk

~~I do not seem to have the same problem running my example in the emulator, so it seems related to either this specific device or all physical devices. I am going to test on another Android device to see if it performs better.~~

Scratch that. I am also able to reproduce this in the Pixel 2 emulator at API Level 30. The instructions work for a fair amount of time, but then the instruction events stop arriving at some point.

aardvarkk avatar Jan 25 '21 17:01 aardvarkk

Hi @aardvarkk

Could you please try to reproduce it in voice-navigation sample? As I receive all instructions along the routes in this app. I simply added listener:

private NavigationManager.NewInstructionEventListener m_instructionEventListener =
            new NavigationManager.NewInstructionEventListener() {
                @Override
                public void onNewInstructionEvent() {
                    m_callbackCount++;
                    String info = "Received instruction #" + m_callbackCount;
                    Toast.makeText(m_activity, info, Toast.LENGTH_SHORT).show();
                }
            };

// start listening for navigation events
m_navigationManager.addNewInstructionEventListener(new WeakReference<>(m_instructionEventListener));

Also, you can download and select voice package within this app in order to hear instruction announcements during active navigation.

Please share your sample code which causes issues.

dashchak avatar Jan 27 '21 14:01 dashchak