GeekyPS / SpotiStats_flutter

Spotify Statistics for Nerds
10 stars 5 forks source link

added spotify sdk and music player interface #9

Closed chandansgowda closed 1 year ago

chandansgowda commented 1 year ago

Hey @GeekyPS Ref - #4 I have added the spotify SDK and a music player interface to play any given song. Right now, I have passed the song URI statically since there is no URI in the dummy data and this can be changed if the dummy data is modified to have the URI of the song. Steps to test the functionality:

  1. Go to TODO in music_player_screen.dart and complete it -Register your app in the spotify developer portal. You also need to create a sha-1 fingerprint and add this and your package name to the app settings on the dashboard as well as a redirect url.
  2. Download Spotify App on the device you are testing this
  3. Go to any song item and click it as shown in the attached video (Shape of You song will be played sine its hardcoded as mentioned above)

https://user-images.githubusercontent.com/41890434/206621909-f8b761f5-dd1b-43aa-a9f4-20386fcee2f2.mov

Further Steps:

  1. Merge this PR if the feature works as expected
  2. Raise an issue to add song URI to Songs Dummy Data
  3. Once the dummy data is ready, I'll work on playing the dynamically passed song URI

Thanks

GeekyPS commented 1 year ago
image image

I have set the client id with an app registered on Spotify dashboard When I tried to build your code for my android device it threw these errors, look into android config files some errors are there to push the latest version working version of your code to the commits, and could please share a video with sound that the song is playing that would make it clear that your code has no fundamental issues.

Once this issue has been resolved i can create an issue labeled hard to fetch uri of songs dynamically

Thanks for giving your time on this issue

chandansgowda commented 1 year ago

Hey @GeekyPS It's working well on two of my devices. It might be a problem with your pub cache folder or flutter environment. Go through the answers in https://stackoverflow.com/questions/59893018/flutter-execution-failed-for-task-appcompiledebugkotlin and see if that helps. I'll add a video with music in a while.

chandansgowda commented 1 year ago

https://user-images.githubusercontent.com/41890434/206858324-90a56bc7-e730-4705-b85d-39b764402a1d.mov

GeekyPS commented 1 year ago

I tried the different suggestions on the link you shared but still it isn't working