1

I've got a problem in SDK init behavior - after

Not allowed to start service Intent ... app is in background

error happens (which is described here - HERE SDK is unusable in background on Android 8)

MapEngine.isInitialized() returns false (which is correct) But next call to MapEngine.getInstance().init() throws error - Engine cannot be initialized twice

We want to allow user retry initialization after failed attempt. Is there another way of doing that? Is there way to create clean map engine without restarting an application?

  • have you tried foreground service also try initializing mapEngine when application starts I personally initalize it from application file not activity and call isInitialized in Activities – trinadh thatakula Jul 07 '21 at 07:22

1 Answers1

1

You'll need to make sure mapEngine initialized while the application is not in background. To avoid this behavior you'll need to use foreground service. Please below github sample. https://github.com/heremaps/here-android-sdk-examples/tree/master/turn-by-turn-navigation/

Younjae Park
  • 141
  • 5