System Requirements

  • Android 4.2 "Jelly Bean" (API Level 17) or higher
  • Android Studio 3.4 or above (building with earlier version might be possible, but is not tested, nor supported)
  • Mass storage is required for persistent storage of map data. At a minimum, 50MB of free space is required to be available for map data

Install the SDK

Note: The tutorial is suitable for SDK Version 18
Note: some of the newer parts of the documentation are in Kotlin and the tutorial will be re-written into Kotlin continuously
Add the maven repository into your project's build.gradle file

repositories {
    maven {
        url ""

Add the following dependency into your application's build.gradle file. Note the @aar part, it is necessary to correctly use the SDK version. See the Release notes for latest version. You can define the sygicSdkVersion variable in the ext part of your project's build.gradle file, or you can replace it directly.

dependencies {
    implementation("com.sygic.sdk:maps-android:$sygicSdkVersion@aar") {
        transitive true

android {
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8

Initialize the SDK

The first step to integrate Sygic SDK is to initialize the SygicEngine. This has to happen before using any other part of the SDK.

You can call the initialization from any place in your app, but please mind that we do not recommend doing it in the Application's onCreate() method as because of its lifecycle, Android might wake the application up in the background anytime and that would cause redundant network traffic.
It's necessary to pass the JSON configuration as a string. You can either create it yourself or use the JsonConfigBuilder, which is available since version 17. You can read more here. The clientID and path configuration items are necessary for proper configuration.

Optional: if you would like to receive logs from the SDK in your application, pass a LogConnector object into the .initialize method just like below:

import com.sygic.sdk.SygicEngine
import com.sygic.sdk.context.CoreInitException
import com.sygic.sdk.context.SygicContext
import com.sygic.sdk.diagnostics.LogConnector

// create a JsonConfigBuilder
val config = SygicEngine.JsonConfigBuilder()
// set the path to the application
val path = applicationContext.getExternalFilesDir(null).toString()
// you can set your clientId here
val clientID = "YOUR_SDK_CLIENT_ID"
// enable the online maps directly at the start

    object : LogConnector() {
        override fun onLogReceived(message: String?, logLevel: Int) {
            super.onLogReceived(message, logLevel)
            //or send the log to firebase
    object : SygicEngine.OnInitCallback {
        override fun onError(p0: CoreInitException) {
            // handle any errors

        override fun onInstance(p0: SygicContext) {
            // your code

To integrate a map into an application is to insert a MapFragment to the view layout of the application. You can do this by adding MapFragment to the layout xml as follows.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""


Alternatively, you can add MapFragment to your Activity in code.

FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

MapFragment fragment = new MapFragment();
fragmentTransaction.add(, fragment);

After adding the MapFragment to the layout, the fragment must be initialized. The MapFragment initialization is processed asynchronously. During initialization, the map engine is initialized to create an instance of MapView that is associated with the MapFragment.

The following code illustrates the basic initialization flow when an Activity is created. The onlineManager.enableOnlineMapStreaming() call enables online maps.
You should always wait for the success callback from the MapStreamingListener before doing simple operations such as calculating a route!
To ensure that the online maps are enabled during the initialization, you can add the following code to your configuration: config.mapReaderSettings().startupOnlineMapsEnabled(true), or to the appropriate field in the JSON if you use it.
To display offline maps, see Offline Maps.

package com.sygic.sdk.gettingstarted;

import android.os.Bundle;

public class MapActivity extends AppCompatActivity {

    protected void onCreate(@Nullable final Bundle savedInstanceState) {

        final MapFragment mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(;

        // getMapAsync() will internally wait for engine initialization
        mapFragment.getMapAsync(new OnMapInitListener() {
            public void onMapInitializationInterrupted() {}

            public void onMapReady(@NonNull MapView mapView) {
                // Now you can start work with the ready mapView object
                OnlineManagerProvider.getInstance(new CoreInitCallback<OnlineManager>() {
                            public void onInstance(@NonNull OnlineManager onlineManager) {
                                onlineManager.enableOnlineMapStreaming(new OnlineManager.MapStreamingListener() {
                                    public void onSuccess() {

                                    public void onError(OnlineManager.MapStreamingError mapStreamingError) {

                            public void onError(@NonNull CoreInitException e) {