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).
@@ -87,106 +127,32 @@ Modifications are needed for the `AppDelegate.m`:
87
127
88
128
### Android
89
129
90
-
This project has been configured to support autolinking in `react-native` > 0.60. However, if you need to you can most likely call `react-native link` to link it. If you need to manually set your project up, the [Example](./example) project is there as an example of what is needed to make this library work.
91
-
92
-
In addition to linking the library into your project, you will also need to add the following code to your
93
-
<!--
94
-
#### Android
130
+
If you need to link your project manually, here are some things you'll need to do.
95
131
96
-
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
132
+
1. Open up `android/app/src/main/java/[...]/MainApplication.java`
97
133
- Add `import com.reactlibrary.RNSpotifyRemotePackage;` to the imports at the top of the file
98
134
- Add `new RNSpotifyRemotePackage()` to the list returned by the `getPackages()` method
99
135
2. Append the following lines to `android/settings.gradle`:
100
136
```
101
-
include ':react-native-spotify-remote'
102
-
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')
103
142
```
104
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. -->
147
150
148
-
## Features
149
-
150
-
The following table is here to show the support for Spotify Remote API functionality within this library.
151
-
152
-
|Feature|iOS|Android|
153
-
|:--|:-:|:-:|
154
-
|Authentication|
155
-
|`authorize` |✅|✅|
156
-
|`getSession` |✅|✅|
157
-
|`endSession` |✅|✅|
158
-
|Remote|
159
-
|`isConnectedAsync` |✅|✅|
160
-
|`connect` |✅|✅|
161
-
|`disconnect` |✅|✅|
162
-
|`playUri` |✅|✅|
163
-
|`playItem` |✅|✅|
164
-
|`playItemWithIndex` |✅|✅|
165
-
|`queueUri` |✅|✅|
166
-
|`seek` |✅|✅|
167
-
|`resume` |✅|✅|
168
-
|`pause` |✅|✅|
169
-
|`skipToNext` |✅|✅|
170
-
|`skipToPrevious` |✅|✅|
171
-
|`setShuffling` |✅|✅|
172
-
|`setRepeatMode` |✅|✅|
173
-
|`getPlayerState` |✅|✅|
174
-
|`getRootContentItems` |✅|❌|
175
-
|`getRecommendedContentItems` |✅|✅|
176
-
|`getChildrenOfItem` |✅|✅|
177
-
|`getContentItemForUri` |✅|❌|
178
-
|`getCrossfadeState` |✅|✅|
179
-
|Remote Events|
180
-
|`playerStateChanged` |✅|❌|
181
-
|`remoteDisconnected` |✅|✅|
182
-
|`remoteConnected` |✅|✅|
183
-
184
-
185
151
## Usage
186
152
187
153
### Example Application
188
154
189
-
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.
@@ -241,6 +207,25 @@ Nothing has been special to deal with Spotify *Free* Users but this module _shou
241
207
242
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.
243
209
244
-
## 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