Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

[AAOS] Deeplinking on Android Automotive not working

[AAOS] Deeplinking on Android Automotive not working

Device

Android (1024p landscape) API 32 Emulator

Operating System

Android Automotive 12L Sv2

 

My Question or Issue

 

Hello,

 

I am implementing the Spotify API on an Android Automotive application and am currently trying to deeplink to the native Android automotive Spotify application following the documentation at Android Content Linking 

 

Following snippet returns true, running my app on an AAOS emulator with Spotify installed:

 

 

PackageManager pm = getPackageManager();
boolean isSpotifyInstalled;
try {
    pm.getPackageInfo("com.spotify.music", 0);
    isSpotifyInstalled = true;
} catch (PackageManager.NameNotFoundException e) {
    isSpotifyInstalled = false;
}

 

 

Therefore, I try to deeplink content as in example below:

 

 

final String spotifyContent = "https://open.spotify.com/album/0sNOF9WDwhWunNAHPD3Baj";

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(spotifyContent));
intent.setPackage("com.spotify.music");
startActivity(intent);

 

 

This seems to not work on Android Automotive, opening the same project on a regular Android tablet emulator with the mobile Spotify app installed and opening the deeplink works without issue.

 

Therefore my question: Is Deeplinking supported on the android automotive application? If yes, what am I missing here?

Reply
0 Replies

Suggested posts