Skip to content

Commit ddc57ca

Browse files
Merge pull request #179 from Onegini/EXAMPLEAND-72
Exampleand 72
2 parents 51dba06 + 55f3617 commit ddc57ca

File tree

10 files changed

+44
-28
lines changed

10 files changed

+44
-28
lines changed

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ dependencies {
8484
}
8585

8686
// Rest Client
87-
implementation 'com.squareup.retrofit2:adapter-rxjava:2.9.0'
87+
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
8888

8989
// Google Support
9090
implementation 'androidx.appcompat:appcompat:1.1.0'
@@ -107,8 +107,8 @@ dependencies {
107107
implementation 'com.jakewharton:butterknife:10.2.0'
108108
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
109109
// RxJava
110-
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
111-
implementation 'io.reactivex.rxjava2:rxjava:2.2.17'
110+
implementation 'io.reactivex.rxjava3:rxjava:3.0.4'
111+
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
112112
}
113113

114114
configurations.all {

app/src/main/java/com/onegini/mobile/exampleapp/network/AnonymousService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,9 +20,9 @@
2020
import com.onegini.mobile.exampleapp.model.ApplicationDetails;
2121
import com.onegini.mobile.exampleapp.network.client.AnonymousClient;
2222
import com.onegini.mobile.exampleapp.network.client.SecureResourceClient;
23-
import io.reactivex.Single;
24-
import io.reactivex.android.schedulers.AndroidSchedulers;
25-
import io.reactivex.schedulers.Schedulers;
23+
import io.reactivex.rxjava3.core.Single;
24+
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
25+
import io.reactivex.rxjava3.schedulers.Schedulers;
2626

2727
public class AnonymousService {
2828

@@ -46,4 +46,4 @@ public Single<ApplicationDetails> getApplicationDetails() {
4646
.subscribeOn(Schedulers.io())
4747
.observeOn(AndroidSchedulers.mainThread());
4848
}
49-
}
49+
}

app/src/main/java/com/onegini/mobile/exampleapp/network/ImplicitUserService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,9 +20,9 @@
2020
import com.onegini.mobile.exampleapp.model.ImplicitUserDetails;
2121
import com.onegini.mobile.exampleapp.network.client.ImplicitUserClient;
2222
import com.onegini.mobile.exampleapp.network.client.SecureResourceClient;
23-
import io.reactivex.Single;
24-
import io.reactivex.android.schedulers.AndroidSchedulers;
25-
import io.reactivex.schedulers.Schedulers;
23+
import io.reactivex.rxjava3.core.Single;
24+
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
25+
import io.reactivex.rxjava3.schedulers.Schedulers;
2626

2727
public class ImplicitUserService {
2828

app/src/main/java/com/onegini/mobile/exampleapp/network/UserService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,9 +20,9 @@
2020
import com.onegini.mobile.exampleapp.network.client.SecureResourceClient;
2121
import com.onegini.mobile.exampleapp.network.client.UserClient;
2222
import com.onegini.mobile.exampleapp.network.response.DevicesResponse;
23-
import io.reactivex.Single;
24-
import io.reactivex.android.schedulers.AndroidSchedulers;
25-
import io.reactivex.schedulers.Schedulers;
23+
import io.reactivex.rxjava3.core.Single;
24+
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
25+
import io.reactivex.rxjava3.schedulers.Schedulers;
2626

2727
public class UserService {
2828

app/src/main/java/com/onegini/mobile/exampleapp/network/client/AnonymousClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
package com.onegini.mobile.exampleapp.network.client;
1818

1919
import com.onegini.mobile.exampleapp.model.ApplicationDetails;
20-
import io.reactivex.Single;
20+
import io.reactivex.rxjava3.core.Single;
2121
import retrofit2.http.GET;
2222

2323
public interface AnonymousClient {

app/src/main/java/com/onegini/mobile/exampleapp/network/client/ImplicitUserClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
package com.onegini.mobile.exampleapp.network.client;
1818

1919
import com.onegini.mobile.exampleapp.model.ImplicitUserDetails;
20-
import io.reactivex.Single;
20+
import io.reactivex.rxjava3.core.Single;
2121
import retrofit2.http.GET;
2222

2323
public interface ImplicitUserClient {

app/src/main/java/com/onegini/mobile/exampleapp/network/client/SecureResourceClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.onegini.mobile.sdk.android.client.OneginiClient;
2222
import okhttp3.OkHttpClient;
2323
import retrofit2.Retrofit;
24-
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
24+
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
2525
import retrofit2.converter.gson.GsonConverterFactory;
2626

2727
public class SecureResourceClient {
@@ -50,9 +50,9 @@ private static <T> T prepareSecuredRetrofitClient(final Class<T> clazz, final Co
5050
.client(okHttpClient)
5151
.baseUrl(oneginiClient.getConfigModel().getResourceBaseUrl())
5252
.addConverterFactory(GsonConverterFactory.create())
53-
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
53+
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
5454
.build();
5555

5656
return retrofit.create(clazz);
5757
}
58-
}
58+
}

app/src/main/java/com/onegini/mobile/exampleapp/network/client/UserClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
package com.onegini.mobile.exampleapp.network.client;
1818

1919
import com.onegini.mobile.exampleapp.network.response.DevicesResponse;
20-
import io.reactivex.Single;
20+
import io.reactivex.rxjava3.core.Single;
2121
import retrofit2.http.GET;
2222

2323
public interface UserClient {

app/src/main/java/com/onegini/mobile/exampleapp/view/activity/DevicesListActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2018 Onegini B.V.
2+
* Copyright (c) 2016-2020 Onegini B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@
3434
import com.onegini.mobile.exampleapp.model.Device;
3535
import com.onegini.mobile.exampleapp.network.UserService;
3636
import com.onegini.mobile.exampleapp.network.response.DevicesResponse;
37-
import io.reactivex.disposables.Disposable;
37+
import io.reactivex.rxjava3.disposables.Disposable;
3838

3939
public class DevicesListActivity extends AppCompatActivity {
4040

app/src/main/java/com/onegini/mobile/exampleapp/view/activity/InfoActivity.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2016-2020 Onegini B.V.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.onegini.mobile.exampleapp.view.activity;
218

319
import static com.onegini.mobile.exampleapp.view.helper.ErrorMessageParser.parseErrorMessage;
@@ -29,7 +45,7 @@
2945
import com.onegini.mobile.sdk.android.handlers.error.OneginiError;
3046
import com.onegini.mobile.sdk.android.handlers.error.OneginiImplicitTokenRequestError;
3147
import com.onegini.mobile.sdk.android.model.entity.UserProfile;
32-
import io.reactivex.disposables.CompositeDisposable;
48+
import io.reactivex.rxjava3.disposables.CompositeDisposable;
3349

3450
public class InfoActivity extends AppCompatActivity {
3551

0 commit comments

Comments
 (0)