Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaEE Guides
Updating to v5.1

Updating to 5.1


This guide is to help developers get setup with the SDL Java library version 5.1. It is assumed that the developer is already updated to at least version 5.0 of the library.

The full release notes are published here.

Maven Central

Starting with SDL Java library version 5.1 the release will be published to Maven Central instead of JCenter.

To gain access to the Maven Central repository, make sure your app's build.gradle file includes the following:

repositories {

SdlManagerListener changes

In 5.1 a new onSystemInfoReceived method was added to the SdlManagerListener. More detail can be found here


SdlManagerListener method: onSystemInfoReceived auto generates in Android Studio to returns false. This will cause your app to not connect. You must change it to true or implement logic to check system info to see if you wish for your app to connect to that system.

SdlManagerListener listener = new SdlManagerListener() {
    public void onStart() {

    public void onDestroy() {

    public void onError(String info, Exception e) {

    public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language language, Language hmiLanguage) {
        return null;

    public boolean onSystemInfoReceived(SystemInfo systemInfo) {
        //Check the SystemInfo object to ensure that the connection to the device should continue
        return true;

Alert View

In 5.1 rather than sending an Alert RPC we now recommend sending an AlertView through the ScreenManagers presentAlert method. More detail can be found here


 private void showAlert(String text) {
        Alert alert = new Alert();


 private void showAlert(String text) {
        AlertView.Builder builder = new AlertView.Builder();
        AlertView alertView = builder.build();
        sdlManager.getScreenManager().presentAlert(alertView, new AlertCompletionListener() {
            public void onComplete(boolean success, Integer tryAgainTime) {
                Log.i(TAG, "Alert presented: "+ success);
View on GitHub.com
Previous Section Next Section