Skip to content

Commit 3e2c9ae

Browse files
author
ehowlsla
committed
flutter 지원
1 parent fca5ada commit 3e2c9ae

File tree

7 files changed

+63
-4
lines changed

7 files changed

+63
-4
lines changed

bootpay/bootpay.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<option name="ALLOW_USER_CONFIGURATION" value="false" />
1818
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
1919
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
20-
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/rs/debug" />
20+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/rs/debug;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
2121
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
2222
<option name="PROJECT_TYPE" value="1" />
2323
</configuration>

bootpay/src/main/java/kr/co/bootpay/BootpayWebView.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ internal class BootpayWebView @JvmOverloads constructor(context: Context, attrs:
308308
}
309309

310310
private fun loadParams(vararg script: String) {
311-
Log.d("script -- ", "${script.joinToString("")};")
312311
load("${script.joinToString("")};")
313312
}
314313

sample/sample.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<option name="ALLOW_USER_CONFIGURATION" value="false" />
1818
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
1919
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
20-
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/rs/debug" />
20+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/rs/debug;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
2121
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
2222
</configuration>
2323
</facet>

sample/src/main/java/bootpay/co/kr/samplepayment/FlutterActivity.java

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class FlutterActivity extends BootpayFlutterActivity {
3030
@Override
3131
protected void onCreate(Bundle savedInstanceState) {
3232
super.onCreate(savedInstanceState);
33-
setContentView(R.layout.activity_native);
33+
setContentView(R.layout.activity_flutter);
3434

3535
// 초기설정 - 해당 프로젝트(안드로이드)의 application id 값을 설정합니다. 결제와 통계를 위해 꼭 필요합니다.
3636
BootpayAnalytics.init(this, "5b14c0ffb6d49c40cda92c4e");
@@ -84,4 +84,35 @@ public void onClick_request(View v) {
8484
.onClose(this)
8585
.request();
8686
}
87+
88+
89+
@Override
90+
public void onError(String message) {
91+
Log.d("bootpay error", message);
92+
}
93+
94+
@Override
95+
public void onCancel(String message) {
96+
Log.d("bootpay cancel", message);
97+
}
98+
99+
@Override
100+
public void onClose(String message) {
101+
Log.d("bootpay close", "close");
102+
}
103+
104+
@Override
105+
public void onReady(String message) {
106+
Log.d("bootpay ready", message);
107+
}
108+
109+
@Override
110+
public void onConfirm(String message) {
111+
Log.d("bootpay confirm", message);
112+
}
113+
114+
@Override
115+
public void onDone(String message) {
116+
Log.d("bootpay done", message);
117+
}
87118
}

sample/src/main/java/bootpay/co/kr/samplepayment/MainActivity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,5 +219,10 @@ public void goApp2AppActivity(View v) {
219219
Intent intent = new Intent(this, App2AppActivity.class);
220220
startActivity(intent);
221221
}
222+
223+
public void goFlutterActivity(View v) {
224+
Intent intent = new Intent(this, FlutterActivity.class);
225+
startActivity(intent);
226+
}
222227
}
223228

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent" >
8+
9+
<Button
10+
android:id="@+id/btn_pay"
11+
android:layout_width="match_parent"
12+
android:layout_height="match_parent"
13+
android:onClick="onClick_request"
14+
android:text="request"/>
15+
16+
</RelativeLayout>

sample/src/main/res/layout/activity_main.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@
152152
android:onClick="goLocalActivity"
153153
android:layout_width="match_parent"
154154
android:layout_height="40dp" />
155+
156+
<Button
157+
android:id="@+id/btn_flutter"
158+
android:text="Flutter"
159+
android:layout_weight="1"
160+
android:onClick="goFlutterActivity"
161+
android:layout_width="match_parent"
162+
android:layout_height="40dp" />
155163
</LinearLayout>
156164
</LinearLayout>
157165
</ScrollView>

0 commit comments

Comments
 (0)