brim-borium / spotify_sdk

Flutter Package to connect the spotify sdk
https://pub.dev/packages/spotify_sdk
Apache License 2.0
143 stars 81 forks source link

Spotify Auth page not opening in Xiaomi Redmi devices #171

Open akshg05 opened 2 years ago

akshg05 commented 2 years ago

!! Attention !! FILL IN ALL SECTIONS OF THIS TEMPLATE OR YOUR ISSUE WILL BE CLOSED WITHOUT INVESTIGATION This is a flutter package that wraps the native iOS and Android Spotify "remote" SDKs as well as the Spotify Web Playback SDK for web. Since it wraps the native SDKs it has the same features and limitations. Please use the search functionality in the native SDK repos to find corresponding issues before opening an issue here. If your issue is deriving from the native SDKs you should open an issue there and not in this repo.

Is this a how to question? NO

Is this a native Spotify SDK issue? NO Native Android app is able to interact and open Spotify Auth window

Have you searched for existing issues? YES

Are you using a Free or Premium Spotify account? Free

Are you aware of the limitations of Free Spotify accounts? Yes

Expected behavior A clear and concise description of what you expected to happen.

Describe the bug Try to connect to Spotify in a Redmi device where the user is authenticating the App for the first time. You should get the Auth page to allow the app. Nothing happens. However, we can see in Notification tray from Spotify that the App is trying to connect.

Steps to Reproduce Steps to reproduce the behavior: Try to connect to Spotify in a Redmi device where the user is authenticating the App for the first time.

Screenshots NA

Spotify_sdk Flutter package version spotify_sdk: ^2.2.0

Target Platform, Version & Device Android 11 Xiaomi/Redmi devices. Works fine on Stock Android and other Realme devices

Development OS Linux

Additional context It works fine if the user has already authenticated the app before on another device.

akshg05 commented 2 years ago

For device running on Android 6, I am getting the Auth screen but on clicking the buttons, nothing happens. From logcat I see that for Android 6 device, Spotify is using webview and url based auth system. However, for other devices where the auth works, it doesn't follow the webview based url callbacks. is this expected? Any reason for this behavior and how can we have the Buttons working on the webview?