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

How to lunch Spotify app by using Intent in Android ?

How to lunch Spotify app by using Intent in Android ?

I knew this might be repeated but my question is very simple.

How do i lunch Spotify App using Intent in Android ?

Right now i am using below type of code (got from Stackoverflow) and it's running and opening particular Album in Spotify App. But i want to open Spotify App and just lunch it's Home screen.

 

val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse("spotify:album:0sNOF9WDwhWunNAHPD3Baj")
intent.putExtra(
Intent.EXTRA_REFERRER,
Uri.parse("android-app://" + this.packageName)
)
this.startActivity(intent)

I don't have any playlist, album or track in my account.  But i want to open Spotify App and just lunch it's Home screen.

 

How can i do this ?

Reply
3 Replies

Hey, @mdp3030 
Welcome to Spotify Community and thanks for reaching out here!

The Intent you're using is linking you to a specific album because the code is linked to:

intent.data = Uri.parse("spotify:album:0sNOF9WDwhWunNAHPD3Baj")

This is an in-app code for albums.

So, if you want to open the Home Screen, maybe you should remove it from your code. 

Check it and let me know if it works...

 

If you have any other further questions or need more help, let me know! I'd love to help!

Best Regards,
hezorg

LuanSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Hi, im new in this, i ask if there is a way of start spotify activity for search

I think is not worth it to replicate that activity on my app, i think that redirect to that activity is the best.

 

 

Thanks

 

 

*snip*

Hey @leexgo1987,

Thanks for searching for the answer you need here! 

 

Just to make sure where on the same page - you're asking about the history of your searches in Spotify, right? These should appear, as soon as you click on the search bar. On the right side next to each individual item, there should also be an with which you're able to remove it from the history. If either of these features isn't functioning correctly, we suggest that you perform a clean reinstall using the steps here.

 

If the issue persists after that, it would be really helpful if you could include a screenshot of what you see. Just make sure that there's no private/sensitive info displayed.

Hope you find this useful. Let us know how you get on.

Mihail Moderator
Help others find this answer and click "Accept as Solution".
If you appreciate an answer, maybe give it a Like.
Are you new to the Community? Take a moment to introduce yourself!

Suggested posts