Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade Android Auth library to 2.0.2 #210

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@
"contributions": [
"code"
]
},
{
"login": "wwdrew",
"name": "Drew Miller",
"avatar_url": "https://avatars.githubusercontent.com/u/49833875?v=4",
"profile": "https://github.com/wwdrew",
"contributions": [
"maintenance"
]
}
],
"contributorsPerLine": 7
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Update

- Upgrade Android Auth library to 2.0.2

### Gradle Change

- Updated gradle to import sdks using sourceSets
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,39 +261,39 @@ Please do not open issues about getting the module to work unless you have tried
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.

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/cjam"><img src="https://avatars2.githubusercontent.com/u/1000288?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Colter McQuay</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=cjam" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lufinkey"><img src="https://avatars3.githubusercontent.com/u/7820113?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luis Finke</b></sub></a><br /><a href="#ideas-lufinkey" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/YozhikM"><img src="https://avatars0.githubusercontent.com/u/27273025?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stanislav</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=YozhikM" title="Code">💻</a></td>
<td align="center"><a href="https://djwillcaine.com"><img src="https://avatars3.githubusercontent.com/u/5376687?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Will Caine</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=djwillcaine" title="Code">💻</a></td>
<td align="center"><a href="http://www.estuderevisapp.com/"><img src="https://avatars0.githubusercontent.com/u/7197169?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Everaldo Rosa de Souza Junior</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=juniorklawa" title="Code">💻</a></td>
<td align="center"><a href="http://www.cankalya.com"><img src="https://avatars.githubusercontent.com/u/33005883?v=4?s=100" width="100px;" alt=""/><br /><sub><b>İbrahim Can KALYA</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=IbrahimCanKALYA" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/uptotec"><img src="https://avatars.githubusercontent.com/u/38630967?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mahmoud Ashraf Mahmoud</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=uptotec" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/cjam"><img src="https://avatars2.githubusercontent.com/u/1000288?v=4" width="100px;" alt=""/><br /><sub><b>Colter McQuay</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=cjam" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lufinkey"><img src="https://avatars3.githubusercontent.com/u/7820113?v=4" width="100px;" alt=""/><br /><sub><b>Luis Finke</b></sub></a><br /><a href="#ideas-lufinkey" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/YozhikM"><img src="https://avatars0.githubusercontent.com/u/27273025?v=4" width="100px;" alt=""/><br /><sub><b>Stanislav</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=YozhikM" title="Code">💻</a></td>
<td align="center"><a href="https://djwillcaine.com"><img src="https://avatars3.githubusercontent.com/u/5376687?v=4" width="100px;" alt=""/><br /><sub><b>Will Caine</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=djwillcaine" title="Code">💻</a></td>
<td align="center"><a href="http://www.estuderevisapp.com/"><img src="https://avatars0.githubusercontent.com/u/7197169?v=4" width="100px;" alt=""/><br /><sub><b>Everaldo Rosa de Souza Junior</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=juniorklawa" title="Code">💻</a></td>
<td align="center"><a href="http://www.cankalya.com"><img src="https://avatars.githubusercontent.com/u/33005883?v=4" width="100px;" alt=""/><br /><sub><b>İbrahim Can KALYA</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=IbrahimCanKALYA" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/uptotec"><img src="https://avatars.githubusercontent.com/u/38630967?v=4" width="100px;" alt=""/><br /><sub><b>Mahmoud Ashraf Mahmoud</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=uptotec" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://linkedin.com/in/serafettinaytekin"><img src="https://avatars.githubusercontent.com/u/19591219?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Şerafettin Aytekin</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=srfaytkn" title="Code">💻</a></td>
<td align="center"><a href="http://reteps.github.io"><img src="https://avatars.githubusercontent.com/u/13869303?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Peter Stenger</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=reteps" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/reinhardholl"><img src="https://avatars.githubusercontent.com/u/4051986?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reinhard Höll</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/issues?q=author%3Areinhardholl" title="Bug reports">🐛</a> <a href="https://github.com/cjam/react-native-spotify-remote/commits?author=reinhardholl" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/gustavoggs"><img src="https://avatars.githubusercontent.com/u/793491?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gustavo Graña</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/issues?q=author%3Agustavoggs" title="Bug reports">🐛</a> <a href="https://github.com/cjam/react-native-spotify-remote/commits?author=gustavoggs" title="Code">💻</a></td>
<td align="center"><a href="https://www.companjenapps.com"><img src="https://avatars.githubusercontent.com/u/12894112?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dylan</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=dylancom" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hoangvvo"><img src="https://avatars.githubusercontent.com/u/40987398?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hoang</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=hoangvvo" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/pretorh"><img src="https://avatars.githubusercontent.com/u/4050990?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hendri Pretorius</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/issues?q=author%3Apretorh" title="Bug reports">🐛</a> <a href="https://github.com/cjam/react-native-spotify-remote/commits?author=pretorh" title="Code">💻</a></td>
<td align="center"><a href="https://linkedin.com/in/serafettinaytekin"><img src="https://avatars.githubusercontent.com/u/19591219?v=4" width="100px;" alt=""/><br /><sub><b>Şerafettin Aytekin</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=srfaytkn" title="Code">💻</a></td>
<td align="center"><a href="http://reteps.github.io"><img src="https://avatars.githubusercontent.com/u/13869303?v=4" width="100px;" alt=""/><br /><sub><b>Peter Stenger</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=reteps" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/reinhardholl"><img src="https://avatars.githubusercontent.com/u/4051986?v=4" width="100px;" alt=""/><br /><sub><b>Reinhard Höll</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/issues?q=author%3Areinhardholl" title="Bug reports">🐛</a> <a href="https://github.com/cjam/react-native-spotify-remote/commits?author=reinhardholl" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/gustavoggs"><img src="https://avatars.githubusercontent.com/u/793491?v=4" width="100px;" alt=""/><br /><sub><b>Gustavo Graña</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/issues?q=author%3Agustavoggs" title="Bug reports">🐛</a> <a href="https://github.com/cjam/react-native-spotify-remote/commits?author=gustavoggs" title="Code">💻</a></td>
<td align="center"><a href="https://www.companjenapps.com"><img src="https://avatars.githubusercontent.com/u/12894112?v=4" width="100px;" alt=""/><br /><sub><b>Dylan</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=dylancom" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/hoangvvo"><img src="https://avatars.githubusercontent.com/u/40987398?v=4" width="100px;" alt=""/><br /><sub><b>Hoang</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=hoangvvo" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/pretorh"><img src="https://avatars.githubusercontent.com/u/4050990?v=4" width="100px;" alt=""/><br /><sub><b>Hendri Pretorius</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/issues?q=author%3Apretorh" title="Bug reports">🐛</a> <a href="https://github.com/cjam/react-native-spotify-remote/commits?author=pretorh" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/suryababus"><img src="https://avatars.githubusercontent.com/u/53492132?v=4?s=100" width="100px;" alt=""/><br /><sub><b>suryababus</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=suryababus" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/suryababus"><img src="https://avatars.githubusercontent.com/u/53492132?v=4" width="100px;" alt=""/><br /><sub><b>suryababus</b></sub></a><br /><a href="https://github.com/cjam/react-native-spotify-remote/commits?author=suryababus" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/wwdrew"><img src="https://avatars.githubusercontent.com/u/49833875?v=4" width="100px;" alt=""/><br /><sub><b>Drew Miller</b></sub></a><br /><a href="#maintenance-wwdrew" title="Maintenance">🚧</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

## Projects using this library
Expand Down
6 changes: 4 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ repositories {
}

dependencies {
implementation (files("external/SpotifySDK/auth-lib/spotify-auth-release-1.2.3.aar"))
implementation "com.spotify.android:auth:2.0.2"
implementation (files("external/SpotifySDK/app-remote-lib/spotify-app-remote-release-0.7.2.aar"))
implementation "com.google.code.gson:gson:2.8.5" // needed by spotify-app-remote
implementation "com.google.code.gson:gson:2.8.9" // needed by spotify-app-remote
implementation "androidx.browser:browser:1.4.0"

//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
}
2 changes: 1 addition & 1 deletion android/external/SpotifySDK
Submodule SpotifySDK updated 86 files
+0 −5 app-remote-sample/build.gradle
+22 −2 auth-lib/CHANGELOG.md
+25 −7 auth-lib/README.md
+0 −33 auth-lib/docs/allclasses-frame.html
+237 −0 auth-lib/docs/allclasses-index.html
+16 −8 auth-lib/docs/allclasses.html
+171 −0 auth-lib/docs/allpackages-index.html
+104 −64 auth-lib/docs/com/spotify/sdk/android/auth/AccountsQueryParameters.html
+137 −118 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationClient.html
+79 −49 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationHandler.OnCompleteListener.html
+89 −55 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationHandler.html
+117 −78 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationRequest.Builder.html
+149 −96 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationRequest.html
+77 −47 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationResponse.Builder.html
+117 −77 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationResponse.Type.html
+150 −97 auth-lib/docs/com/spotify/sdk/android/auth/AuthorizationResponse.html
+92 −56 auth-lib/docs/com/spotify/sdk/android/auth/IntentExtras.html
+157 −110 auth-lib/docs/com/spotify/sdk/android/auth/LoginActivity.html
+106 −68 auth-lib/docs/com/spotify/sdk/android/auth/app/SpotifyAuthHandler.html
+90 −55 auth-lib/docs/com/spotify/sdk/android/auth/app/SpotifyNativeAuthUtil.html
+0 −21 auth-lib/docs/com/spotify/sdk/android/auth/app/package-frame.html
+58 −35 auth-lib/docs/com/spotify/sdk/android/auth/app/package-summary.html
+60 −35 auth-lib/docs/com/spotify/sdk/android/auth/app/package-tree.html
+367 −0 auth-lib/docs/com/spotify/sdk/android/auth/browser/BrowserAuthHandler.html
+189 −105 auth-lib/docs/com/spotify/sdk/android/auth/browser/LoginDialog.html
+59 −36 auth-lib/docs/com/spotify/sdk/android/auth/browser/package-summary.html
+165 −0 auth-lib/docs/com/spotify/sdk/android/auth/browser/package-tree.html
+0 −36 auth-lib/docs/com/spotify/sdk/android/auth/package-frame.html
+71 −48 auth-lib/docs/com/spotify/sdk/android/auth/package-summary.html
+79 −50 auth-lib/docs/com/spotify/sdk/android/auth/package-tree.html
+0 −329 auth-lib/docs/com/spotify/sdk/android/auth/webview/WebViewAuthHandler.html
+0 −21 auth-lib/docs/com/spotify/sdk/android/auth/webview/package-frame.html
+0 −140 auth-lib/docs/com/spotify/sdk/android/auth/webview/package-tree.html
+137 −89 auth-lib/docs/constant-values.html
+55 −32 auth-lib/docs/deprecated-list.html
+1 −1 auth-lib/docs/element-list
+105 −57 auth-lib/docs/help-doc.html
+179 −134 auth-lib/docs/index-all.html
+156 −64 auth-lib/docs/index.html
+10,872 −0 auth-lib/docs/jquery/external/jquery/jquery.js
+ auth-lib/docs/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png
+ auth-lib/docs/jquery/images/ui-bg_glass_65_dadada_1x400.png
+ auth-lib/docs/jquery/images/ui-bg_glass_75_dadada_1x400.png
+ auth-lib/docs/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png
+ auth-lib/docs/jquery/images/ui-bg_glass_95_fef1ec_1x400.png
+ auth-lib/docs/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png
+ auth-lib/docs/jquery/images/ui-icons_222222_256x240.png
+ auth-lib/docs/jquery/images/ui-icons_2e83ff_256x240.png
+ auth-lib/docs/jquery/images/ui-icons_454545_256x240.png
+ auth-lib/docs/jquery/images/ui-icons_888888_256x240.png
+ auth-lib/docs/jquery/images/ui-icons_cd0a0a_256x240.png
+10,872 −0 auth-lib/docs/jquery/jquery-3.5.1.js
+582 −0 auth-lib/docs/jquery/jquery-ui.css
+2,659 −0 auth-lib/docs/jquery/jquery-ui.js
+7 −0 auth-lib/docs/jquery/jquery-ui.min.css
+6 −0 auth-lib/docs/jquery/jquery-ui.min.js
+156 −0 auth-lib/docs/jquery/jquery-ui.structure.css
+5 −0 auth-lib/docs/jquery/jquery-ui.structure.min.css
+56 −0 auth-lib/docs/jquery/jszip-utils/dist/jszip-utils-ie.js
+10 −0 auth-lib/docs/jquery/jszip-utils/dist/jszip-utils-ie.min.js
+118 −0 auth-lib/docs/jquery/jszip-utils/dist/jszip-utils.js
+10 −0 auth-lib/docs/jquery/jszip-utils/dist/jszip-utils.min.js
+11,367 −0 auth-lib/docs/jquery/jszip/dist/jszip.js
+13 −0 auth-lib/docs/jquery/jszip/dist/jszip.min.js
+1 −0 auth-lib/docs/member-search-index.js
+ auth-lib/docs/member-search-index.zip
+0 −23 auth-lib/docs/overview-frame.html
+13 −134 auth-lib/docs/overview-summary.html
+85 −56 auth-lib/docs/overview-tree.html
+1 −0 auth-lib/docs/package-search-index.js
+ auth-lib/docs/package-search-index.zip
+ auth-lib/docs/resources/glass.png
+ auth-lib/docs/resources/x.png
+125 −6 auth-lib/docs/script.js
+326 −0 auth-lib/docs/search.js
+412 −80 auth-lib/docs/stylesheet.css
+1 −0 auth-lib/docs/type-search-index.js
+ auth-lib/docs/type-search-index.zip
+ auth-lib/spotify-auth-release-1.2.3.aar
+ auth-lib/spotify-auth-release-2.0.1.aar
+5 −9 auth-sample/build.gradle
+2 −1 auth-sample/src/main/AndroidManifest.xml
+1 −1 auth-sample/src/main/java/com/spotify/sdk/android/authentication/sample/MainActivity.java
+1 −1 build.gradle
+6 −6 gradle.properties
+1 −1 gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ public void endSession(Promise promise) {
mConnectionParamsBuilder = null;
mConfig = null;

AuthorizationClient.clearCookies(this.getReactApplicationContext());

RNSpotifyRemoteAppModule remoteModule = reactContext.getNativeModule(RNSpotifyRemoteAppModule.class);
if (remoteModule != null) {
remoteModule.disconnect(promise);
Expand Down