You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An [Example](./example) project was developed to exercise and test all functionality within this library. If you are curious about how to use something, or need to compare your application setup to something that works, check there first.
15
+
16
+
## Features
17
+
18
+
The following table shows the platform support for various Spotify Remote API functionality within this library.
19
+
20
+
|Feature|iOS|Android||
21
+
|:--|:-:|:-:|-:|
22
+
|Authentication|
23
+
|`authorize`|✅|✅||
24
+
|`getSession`|✅|✅||
25
+
|`endSession`|✅|✅||
26
+
|Remote|
27
+
|`isConnectedAsync`|✅|✅||
28
+
|`connect`|✅|✅||
29
+
|`disconnect`|✅|✅||
30
+
|`playUri`|✅|✅||
31
+
|`playItem`|✅|✅||
32
+
|`playItemWithIndex`|✅|✅||
33
+
|`queueUri`|✅|✅||
34
+
|`seek`|✅|✅||
35
+
|`resume`|✅|✅||
36
+
|`pause`|✅|✅||
37
+
|`skipToNext`|✅|✅||
38
+
|`skipToPrevious`|✅|✅||
39
+
|`setShuffling`|✅|✅||
40
+
|`setRepeatMode`|✅|✅||
41
+
|`getPlayerState`|✅|✅||
42
+
|`getRootContentItems`|✅|❌|Not available in Android SDK|
43
+
|`getRecommendedContentItems`|✅|✅||
44
+
|`getChildrenOfItem`|✅|✅||
45
+
|`getContentItemForUri`|✅|❌|Not available in Android SDK|
As of React Native `> 0.61`, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it *Should* work out of the box. The one caveat, is that `react-native-events` needs to be linked as it doesn't yet support auto linking. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running.
67
+
28
68
### iOS
29
69
30
70
>This library requires being built with **XCode 11** for reasons given [here](https://github.com/spotify/ios-sdk/issues/179#issuecomment-581032275).
@@ -85,102 +125,34 @@ Modifications are needed for the `AppDelegate.m`:
85
125
@end
86
126
```
87
127
88
-
<!--
89
-
#### Android
128
+
### Android
129
+
130
+
If you need to link your project manually, here are some things you'll need to do.
90
131
91
-
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
132
+
1. Open up `android/app/src/main/java/[...]/MainApplication.java`
92
133
- Add `import com.reactlibrary.RNSpotifyRemotePackage;` to the imports at the top of the file
93
134
- Add `new RNSpotifyRemotePackage()` to the list returned by the `getPackages()` method
94
135
2. Append the following lines to `android/settings.gradle`:
95
136
```
96
-
include ':react-native-spotify-remote'
97
-
project(':react-native-spotify-remote').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spotify-remote/android')
137
+
include ':react-native-spotify-remote'
138
+
project(':react-native-spotify-remote').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spotify-remote/android')
139
+
140
+
include ':react-native-events'
141
+
project(':react-native-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-events/android')
98
142
```
99
143
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
If you have issues linking the module, please check that gradle is updated to the latest version and that your project is synced. -->
142
150
143
-
## Features
144
-
145
-
The following table is here to show the support for Spotify Remote API functionality within this library.
146
-
147
-
|Feature|iOS|Android|
148
-
|:--|:-:|:-:|
149
-
|Authentication|
150
-
|`initialize`|[x]|[ ]|
151
-
|`getSession`|[x]|[ ]|
152
-
|`endSession`|[x]|[ ]|
153
-
|Remote|
154
-
|`isConnectedAsync`|[x]|[ ]|
155
-
|`connect`|[x]|[ ]|
156
-
|`playUri`|[x]|[ ]|
157
-
|`playItem`|[x]|[ ]|
158
-
|`playItemWithIndex`|[x]|[ ]|
159
-
|`queueUri`|[x]|[ ]|
160
-
|`seek`|[x]|[ ]|
161
-
|`resume`|[x]|[ ]|
162
-
|`pause`|[x]|[ ]|
163
-
|`skipToNext`|[x]|[ ]|
164
-
|`skipToPrevious`|[x]|[ ]|
165
-
|`setShuffling`|[x]|[ ]|
166
-
|`setRepeatMode`|[x]|[ ]|
167
-
|`getPlayerState`|[x]|[ ]|
168
-
|`getRootContentItems`|[x]|[ ]|
169
-
|`getRecommendedContentItems`|[x]|[ ]|
170
-
|`getChildrenOfItem`|[x]|[ ]|
171
-
|`getContentItemForUri`|[x]|[ ]|
172
-
|`getCrossfadeState`|[x]|[ ]|
173
-
|Remote Events|
174
-
|`playerStateChanged`|[x]|[ ]|
175
-
|`remoteDisconnected`|[x]|[ ]|
176
-
|`remoteConnected`|[x]|[ ]|
177
-
178
-
179
151
## Usage
180
152
181
153
### Example Application
182
154
183
-
This repo contains an [Example App](./example/Readme.md) which should be the quickest and easiest way to get up and running to try things out. It is using React Hooks (cuz they're pretty cool) and is using a few of the remote API calls. (Will be looking to show use of all of the api calls in the near future).
155
+
This repo contains an [Example App](./example/Readme.md) which should be the quickest and easiest way to get up and running to try things out. It is using React Hooks (cuz they're pretty cool) and exercises all of the remote API calls.
@@ -235,6 +207,25 @@ Nothing has been special to deal with Spotify *Free* Users but this module _shou
235
207
236
208
Please do not open issues about getting the module to work unless you have tried using both the example app and the example token swap server. Please make sure you have tried running on the latest react-native version before submitting a bug.
237
209
238
-
## Acknowledgements
210
+
## Contributors
211
+
212
+
Big thanks to [@lufinkey](https://github.com/lufinkey) and all of the great work that he has done in the [react-native-spotify](https://github.com/lufinkey/react-native-spotify) repo which was the original source of inspiration and some useful patterns for this package.
213
+
214
+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
Big thanks to [@lufinkey](https://github.com/lufinkey) and all of the great work that he has done in the [react-native-spotify](https://github.com/lufinkey/react-native-spotify) repo which was the original source of inspiration & coding patterns for this package.
0 commit comments