Start "Spotify" with "Activity starter"

Hi, would need some help on how to start the app "Spotify" using "Activity starter". I manage to start other apps but when it comes to Spotify it won't open. Does anyone know how to fix it? and could you then give an example. Have read through everything in the info document for "Activity starter", but it has not helped.

// Ludde

image

Did you try Lied von Spotify abspielen - #2 by Gordon_Lu

Yes, but it doesn't help. I just want to be able to launch the spotify app from my app

As actiom try android.intent.action.MAIN
Taifun

It doesn't work either, It's like the app opens for 500ms then closes and you come back to your own app (This only happens the first time you run the app, then nothing happens)

See here how to find out the correct settings
http://ai2.appinventor.mit.edu/reference/other/activitystarter.html

And use logcat to find out more about why Spotify is closing again

Taifun

I think I have found the problem, in the spotify developer's dashboard you have to "whitelist" Android package for it to work. The problem is that I don't know how to get the "Package SHA1 fingerprint" does anyone know an easy way?

https://developer.spotify.com/documentation/android/tutorials/application-fingerprints

Here you can see how to create a fingerprint but don't understand how I can do it in app inventor

Download your keystore as described here

https://appinventor.mit.edu/explore/ai2/google-play.html

From the designer under the "Projects" menu there is a choice labeled "Export Keystore". Select this option. This will download your keystore file to your local computer.

and follow these instructions from Spotify

Taifun

But how do I get a "SHA1 fingerprint" from the keystore? I do not understand

I never did this myself, but I would just follow the description here

https://developer.spotify.com/documentation/android/tutorials/application-fingerprints

So if you use a Windows PC, open a Powershell window and type

keytool -alias androiddebugkey -keystore yourKeystoreFile -list -v | grep SHA1

More about keytool see here Search results for 'Keytool' - MIT App Inventor Community

See also Error al compilar mi aplicación! Keystore Personalizado! - #3 by Boban

Taifun

The file I get out of app inventor is called "android.keystore" and everyone else uses something called "debug.keystore" is there any difference between them? and is SHA1 the same on all my apps? (as I download a keystore across all apps)

The Spotify document talks about debug and release keystores... all your App Inventor apps on the main server use the same keystore
So the generated SHA1 will be the same for all your apps built on the main server

Taifun

I have solved it, The problem is not about SHA1. But apparently needed to have a DataUri (spotify:)

// Ludde
image

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.