flutter_spotify_remote 0.0.4
flutter_spotify_remote: ^0.0.4 copied to clipboard
Control the Spotify app from Flutter: playback commands, a real-time player state stream, and OAuth with silent token refresh on both iOS and Android.
0.0.4 #
Android auth parity. Android now implements the full session/token contract that previously existed only on iOS.
- Android: implemented
initializeSession()/renewSession()— previouslynotImplemented, so Android never obtained a token - Android:
getAccessToken()now returns the live token instead of aNOT_SUPPORTEDerror, and theaccessTokenevent is emitted with the samesourcevalues as iOS (firstAuth/silentRefresh) - Android: OAuth via the Spotify auth library (
com.spotify.android:auth), with backend token swap and refresh whentokenSwapURL/tokenRefreshURLare set - Android:
connectWithToken()now reuses the supplied token withshowAuthView(false)instead of running an interactive connect, so silent reconnects no longer app-switch into Spotify - Android: declared
<queries>forcom.spotify.music— Android 11+ package visibility madeconnect()fail withCouldNotFindSpotifyAppeven when Spotify was installed - Android:
SPOTIFY_NOT_INSTALLED/TOKEN_EXPIREDerror codes and thedisconnectedevent now match the iOS contract;spotifyUriis honoured on connect - Android setup now requires the
redirectSchemeName/redirectHostNamemanifest placeholders — see README - Added
canPlayOnDemand()— reports whether the connected account may play an individual track URI (Spotify Free accounts cannot), so callers can adapt the UI instead of lettingplay()fail - iOS: unchanged
0.0.3 #
- Bundled
SpotifyiOS.xcframework(v5.0.1) directly — no Podfilesourcerequired in consuming apps - Fixed
initiateSessionbuild error caused by new requiredcampaignparameter in SDK v5.0.1 - Added
initializeSession()— configuresSPTSessionManagerwith backendtokenSwapURLandtokenRefreshURLso the iOS SDK performs silent token refresh automatically (~every 55 min), with no app-switch after the first user approval - Added
renewSession()— manually triggers a silent backend refresh at any time - Added
sourcefield toSpotifyAccessTokenEvent('firstAuth'/'silentRefresh'/'directAuth') so callers can distinguish how each token was obtained - iOS:
SPTSessionManagerDelegatefiresSpotifyAccessTokenEventon both first auth and every automatic renewal;SPTAppRemoteis reconnected automatically after silent refresh
0.0.2 #
- iOS improvements and bug fixes
0.0.1 #
- Initial release
- iOS support via Spotify iOS SDK v5.0.1 (CocoaPods — no bundled xcframework)
- Android support via Spotify Android App Remote SDK (.aar)
- Playback control: play, pause, resume, skip next/previous, seek, shuffle, repeat
- Real-time
Stream<SpotifyEvent>for player state and connection changes SpotifyAccessTokenEventfor Flutter-side token persistence (iOS)- Typed exceptions:
SpotifyNotInstalledException,SpotifyAuthException,SpotifyConnectionException,SpotifyCommandException