This app shows how to use a foreground service and fetch location updates in background to visualize your current location on a map. You can find out how this is done in BackgroundPositioningExample.java. The app shows a status bar notification, so that users are actively aware that the app is fetching location updates until the service is stopped or the app is removed.
- Copy the AAR file of the HERE SDK for Android to your app's
app/libs
folder.
Note: If your AAR version is different than the version shown in the Developer Guide, you may need to adapt the source code of the example app.
- Open Android Studio and sync the project.
Please do not forget: To run the app, you need to add your HERE SDK credentials to the MainActivity.java
file. More information can be found in the Get Started section of the Developer Guide.