Skip to content

Commit 2672b59

Browse files
author
ehowlsla
committed
unity sdk 지원을 위한 리팩토링, 코틀린 제거
1 parent eb39e16 commit 2672b59

File tree

4 files changed

+60
-11
lines changed

4 files changed

+60
-11
lines changed

bootpay/bootpay.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</configuration>
2424
</facet>
2525
</component>
26-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
26+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
2727
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
2828
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
2929
<exclude-output />

bootpay/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ android {
1818
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1919
}
2020
}
21-
compileOptions {
22-
sourceCompatibility JavaVersion.VERSION_1_8
23-
targetCompatibility JavaVersion.VERSION_1_8
24-
}
21+
// compileOptions {
22+
// sourceCompatibility JavaVersion.VERSION_1_8
23+
// targetCompatibility JavaVersion.VERSION_1_8
24+
// }
2525
}
2626

2727
dependencies {

bootpay/src/main/java/kr/co/bootpay/analytics/AnalyticsPresenter.java

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import kr.co.bootpay.secure.BootpaySimpleAES256;
1414
import kr.co.bootpay.model.StatLogin;
1515
import kr.co.bootpay.pref.UserInfo;
16+
import rx.Observer;
1617
import rx.Scheduler;
1718
import rx.schedulers.Schedulers;
1819

@@ -55,10 +56,38 @@ public void login(String id,
5556
)
5657
.retry(3)
5758
.subscribeOn(thread)
58-
.subscribe(res -> {
59-
if(res.getData() != null)
60-
UserInfo.getInstance(service.getContext()).setBootpayUserId(res.getData().getUserId());
61-
}, Throwable::printStackTrace);
59+
.subscribe(
60+
new Observer<LoginResult>() {
61+
@Override
62+
public void onCompleted() {
63+
64+
}
65+
66+
@Override
67+
public void onError(Throwable e) {
68+
e.printStackTrace();
69+
70+
}
71+
72+
@Override
73+
public void onNext(LoginResult res) {
74+
if(res.getData() != null)
75+
UserInfo.getInstance(service.getContext()).setBootpayUserId(res.getData().getUserId());
76+
}
77+
});
78+
79+
80+
// service.getApi()
81+
// .login(
82+
// aes.strEncode(json),
83+
// aes.getSessionKey()
84+
// )
85+
// .retry(3)
86+
// .subscribeOn(thread)
87+
// .subscribe(res -> {
88+
// if(res.getData() != null)
89+
// UserInfo.getInstance(service.getContext()).setBootpayUserId(res.getData().getUserId());
90+
// }, Throwable::printStackTrace);
6291
}
6392

6493
public void call(String url,
@@ -86,8 +115,27 @@ public void call(String url,
86115
)
87116
.retry(3)
88117
.subscribeOn(thread)
89-
.subscribe(res -> Log.d("BootpayAnalytics", "call"),
90-
Throwable::printStackTrace);
118+
.subscribe(
119+
new Observer<LoginResult>() {
120+
@Override
121+
public void onCompleted() {
122+
123+
}
124+
125+
@Override
126+
public void onError(Throwable e) {
127+
e.printStackTrace();
128+
129+
}
130+
131+
@Override
132+
public void onNext(LoginResult res) {
133+
Log.d("BootpayAnalytics", "call");
134+
}
135+
});
136+
137+
// .subscribe(res -> Log.d("BootpayAnalytics", "call"),
138+
// Throwable::printStackTrace);
91139

92140
}
93141

sample/sample.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/apk_list" />
8989
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
9090
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
91+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
9192
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundle_manifest" />
9293
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
9394
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />

0 commit comments

Comments
 (0)