Skip to content

Commit cf06a97

Browse files
authored
Merge pull request #205 from spotify/auth-1.2.3
Bum auth-lib and update keystore configuration in sample-auth
2 parents 337c496 + a1d9fdb commit cf06a97

File tree

6 files changed

+27
-11
lines changed

6 files changed

+27
-11
lines changed

app-remote-sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ description = 'Public App Remote SDK demo app'
2121
*/
2222

2323
apply plugin: 'com.android.application'
24-
apply plugin: 'kotlin-android-extensions'
2524
apply plugin: 'kotlin-android'
25+
apply plugin: 'kotlin-android-extensions'
2626

2727
android {
2828

auth-lib/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Change Log
22
==========
3+
## Version 1.2.3
4+
* Stability fixes on WebView based auth
5+
* Set LoginActivity launch mode to CLEAR_TOP but not SINGLE_TOP, so the activity will be recreated
6+
37
## Version 1.2.2
48
* Remove custom-tabs handling due to issues
59

auth-lib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ that can subsequently be used to play music or in requests to the [Spotify Web A
1010
To add this library to your project add the reference to its `build.gradle` file:
1111

1212
```gradle
13-
implementation 'com.spotify.android:auth:1.2.2'
13+
implementation 'com.spotify.android:auth:1.2.3'
1414
```
1515

1616
To learn more about working with authentication see the

auth-sample/build.gradle

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ android {
2626
buildToolsVersion androidBuildTools
2727
compileSdkVersion androidCompileSdk.toString().toInteger()
2828

29+
signingConfigs {
30+
debug {
31+
storeFile file('keystore/example.keystore')
32+
storePassword 'example'
33+
keyAlias 'example_alias'
34+
keyPassword 'example'
35+
}
36+
}
37+
2938
defaultConfig {
3039
applicationId "com.spotify.sdk.android.authentication.sample"
3140

@@ -39,6 +48,10 @@ android {
3948
}
4049

4150
buildTypes {
51+
debug {
52+
debuggable true
53+
signingConfig signingConfigs.debug
54+
}
4255
release {
4356
minifyEnabled false
4457
proguardFiles getDefaultProguardFile('proguard-android.txt')
@@ -61,8 +74,8 @@ android {
6174
}
6275

6376
dependencies {
64-
//implementation files('../auth-lib/spotify-auth-release-1.2.2.aar') // Optional as local aar file dependency
65-
implementation 'com.spotify.android:auth:1.2.2' // Maven dependency
77+
//implementation files('../auth-lib/spotify-auth-release-1.2.3.aar') // Optional as local aar file dependency
78+
implementation 'com.spotify.android:auth:1.2.3' // Maven dependency
6679
implementation "androidx.appcompat:appcompat:$appCompatVersion"
6780
implementation 'com.google.android.material:material:1.0.0'
6881
implementation 'com.squareup.okhttp3:okhttp:3.12.3'
2.21 KB
Binary file not shown.

auth-sample/src/main/java/com/spotify/sdk/android/authentication/sample/MainActivity.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ private AuthorizationRequest getAuthenticationRequest(AuthorizationResponse.Type
127127
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
128128
super.onActivityResult(requestCode, resultCode, data);
129129
final AuthorizationResponse response = AuthorizationClient.getResponse(resultCode, data);
130-
130+
if (response.getError() != null && response.getError().isEmpty()) {
131+
setResponse(response.getError());
132+
}
131133
if (requestCode == AUTH_TOKEN_REQUEST_CODE) {
132134
mAccessToken = response.getAccessToken();
133135
updateTokenView();
@@ -138,12 +140,9 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
138140
}
139141

140142
private void setResponse(final String text) {
141-
runOnUiThread(new Runnable() {
142-
@Override
143-
public void run() {
144-
final TextView responseView = findViewById(R.id.response_text_view);
145-
responseView.setText(text);
146-
}
143+
runOnUiThread(() -> {
144+
final TextView responseView = findViewById(R.id.response_text_view);
145+
responseView.setText(text);
147146
});
148147
}
149148

0 commit comments

Comments
 (0)