Announcements

Help Wizard

Step 1

NEXT STEP

[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

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random