JoshLmao / Spotify4Unity

🎮🎵 Add the SpotifyAPI.NET library into Unity, enabling access to the Spotify Web API, allowing for control of Spotify and accessing the world of music
https://assetstore.unity.com/packages/tools/integration/spotify4unity-ui-tools-spotify-authorization-129028
MIT License
97 stars 8 forks source link

not work in android (can't connect to spotify in android) #20

Open rajputsanjeev opened 5 years ago

rajputsanjeev commented 5 years ago

it will open blank web page when i click on connect button Redirect URL in both dashboard and application is same is it necessary to be a prime member for android testing ? unity version 19.1.1

JoshLmao commented 5 years ago

Is this when you are testing inside the Editor? If you read the documentation, testing while on PC targeting Android requires you to do additional steps to be able to test. Check here for more info

If this is when you have built your apk and testing on an Android device, then your redirect url's are incorrect.

rajputsanjeev commented 5 years ago

it work fine in editor but not in android it when i click on connect button it will open a browser with no content i also my scheme > spotify4unityscheme redirect url suffix > oauth/callback/spotify/

DASHBOARD > spotify4unityscheme://oauth/callback/spotify/

Any thing wrong in this content

and also i add myschema name in AndroidManifest

JoshLmao commented 5 years ago

Preferably, you should use your OWN schema and not the example one so that there aren't any conflicts with other people's schema's AND so that you've followed each setup step. If it is an error with Spotify, it would display on the web page however since you're getting a blank page, it shows the problem is with the deep linking. Just make sure you've followed each of the steps correctly on the Android Setup page.

rajputsanjeev commented 5 years ago

DashBoard Redirect URI Screenshot (43) Unity Screenshot (41) web page Screenshot_2019-09-11-11-34-10-422_com android browser

JoshLmao commented 5 years ago

Okay, so you aren't getting a blank page, the problem is right there on the web page. The redirect uri is incorrect. Can you check the url of the web page and make sure the "&redirect_uri=....." is correct and matches the spotify dashboard & the one inside Unity? Since it's encoded, your url redirect will look like this

image

You can use this website if you need help: https://www.url-encode-decode.com/

rajputsanjeev commented 5 years ago

now i get blank page but it stay at that page and when i go back to the apk it can't connected to spotify.What next i do after blank page

JoshLmao commented 5 years ago

What? I asked you to check the "&redirect_uri=..." parameter. Can you copy and paste the full URL of the 'blank page' but remove your client id from the string?