Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions extension-iap/api/iap.script_api
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@

- `iap.PROVIDER_ID_FACEBOOK`

- `iap.PROVIDER_ID_FACEBOOK`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate. Should be iap.PROVIDER_ID_SAMSUNG

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thank you


#*****************************************************************************************************

- name: list
Expand Down Expand Up @@ -327,6 +329,10 @@
type: number
desc: iap provider id for Google

- name: PROVIDER_ID_SAMSUNG
type: number
desc: iap provider id for Samsung

- name: REASON_UNSPECIFIED
type: number
desc: unspecified error reason
Expand Down
8 changes: 7 additions & 1 deletion extension-iap/ext.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ platforms:
x86_64-ios:
context:
weakFrameworks: ['StoreKit', 'UIKit', 'Foundation']


armv7-android:
context:
aaptExtraPackages: ['com.samsung.android.sdk.iap.lib']
arm64-android:
context:
aaptExtraPackages: ['com.samsung.android.sdk.iap.lib']
Binary file added extension-iap/lib/android/samsung-iap-6.3.0.jar
Binary file not shown.
28 changes: 27 additions & 1 deletion extension-iap/manifests/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,38 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{android.package}}">
<uses-sdk android:minSdkVersion="{{android.minimum_sdk_version}}" android:targetSdkVersion="{{android.target_sdk_version}}" />
<queries>
<package android:name="com.sec.android.app.samsungapps" />
</queries>

<application>
<!-- For Amazon IAP -->
<receiver android:exported="true" android:name="com.amazon.device.iap.ResponseReceiver" android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY">
<intent-filter>
<action android:name="com.amazon.inapp.purchasing.NOTIFY" />
</intent-filter>
</receiver>

<!-- For Samsung IAP -->
<activity
android:name="com.samsung.android.sdk.iap.lib.activity.DialogActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/Theme.Empty" />
<activity
android:name="com.samsung.android.sdk.iap.lib.activity.CheckPackageActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/Theme.Empty" />
<activity
android:name="com.samsung.android.sdk.iap.lib.activity.PaymentActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|locale|uiMode|fontScale|density"
android:excludeFromRecents="true"
android:theme="@style/Theme.Empty" />
<activity
android:name="com.samsung.android.sdk.iap.lib.activity.ChangeSubscriptionPlanActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|locale|uiMode|fontScale|density"
android:excludeFromRecents="true"
android:theme="@style/Theme.Empty" />
</application>
</manifest>

<uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@color/dialog_button_text"/>
<item android:state_enabled="true" android:state_focused="true" android:color="@color/dialog_button_text"/>
<item android:state_enabled="false" android:color="#660074d4"/>
<item android:color="@color/dialog_button_text"/>
</selector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions extension-iap/res/android/res/drawable/dialog_button_animation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_pressed="true">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="18dp" />
<solid android:color="@color/dialog_button_pressed" />
<stroke android:width="0dp" android:color="@color/dialog_button_pressed" />
</shape>
</item>
</layer-list>
</item>
<item android:state_enabled="true" android:state_focused="true">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="18dp" />
<solid android:color="@color/dialog_button_pressed" />
<stroke android:width="0dp" android:color="@color/dialog_button_pressed" />
</shape>
</item>
</layer-list>
</item>
<item android:alpha="0.4" android:state_enabled="false">
<shape android:shape="rectangle">
<corners android:radius="18dp" />
<solid android:color="@color/transparent" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:radius="18dp" />
<solid android:color="@color/transparent" />
</shape>
</item>
</selector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions extension-iap/res/android/res/drawable/dialog_radius_dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#252525" />
<corners android:radius="26dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FCFCFC" />
<corners android:radius="26dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/circle_60x60_dark"
android:pivotX="50%"
android:pivotY="50%"></animated-rotate>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/circle_60x60_light"
android:pivotX="50%"
android:pivotY="50%"></animated-rotate>
19 changes: 19 additions & 0 deletions extension-iap/res/android/res/drawable/progressbar_middle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<rotate
android:drawable="@drawable/tw_widget_progressbar_holo_light"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="0"
android:toDegrees="1080" />
</item>
<item>
<rotate
android:drawable="@drawable/tw_widget_progressbar_effect_holo_light"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="720"
android:toDegrees="0" />
</item>
</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions extension-iap/res/android/res/layout/dialog_dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dialog_radius_dark"
android:orientation="vertical">

<TextView
android:id="@+id/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="24dp"
android:textColor="@color/dialog_title_dark"
android:textSize="20sp" />

<TextView
android:id="@+id/dialog_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="18dp"
android:lineSpacingExtra="4sp"
android:textColor="@color/dialog_message_dark"
android:textSize="16sp" />

<TextView
android:id="@+id/dialog_message_extra"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:lineSpacingExtra="4sp"
android:textColor="@color/dialog_message_extra"
android:textSize="12sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_marginLeft="24dp"
android:layout_marginTop="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="20dp"
android:orientation="horizontal">

<Button
android:id="@+id/dialog_cancel_btn"
style="@style/DialogButton"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:textColor="@color/dialog_button_text_dark" />

<ImageView
android:id="@+id/dialog_btn_padding"
android:layout_width="1dp"
android:layout_height="16dp"
android:layout_marginEnd="17dp"
android:layout_marginStart="17dp"
android:layout_marginTop="9dp"
android:src="@color/dialog_button_separation_color" />

<Button
android:id="@+id/dialog_ok_btn"
style="@style/DialogButton"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:textColor="@color/dialog_button_text_dark"/>
</LinearLayout>
</LinearLayout>
76 changes: 76 additions & 0 deletions extension-iap/res/android/res/layout/dialog_light.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dialog_radius_light"
android:orientation="vertical">

<TextView
android:id="@+id/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="24dp"
android:textColor="@color/dialog_title"
android:textSize="20sp" />

<TextView
android:id="@+id/dialog_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="18dp"
android:lineSpacingExtra="4sp"
android:textColor="@color/dialog_message"
android:textSize="16sp" />

<TextView
android:id="@+id/dialog_message_extra"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:lineSpacingExtra="4sp"
android:textColor="@color/dialog_message_extra"
android:textSize="12sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_marginLeft="24dp"
android:layout_marginTop="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="20dp"
android:orientation="horizontal">

<Button
android:id="@+id/dialog_cancel_btn"
style="@style/DialogButton"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:textColor="@color/dialog_button_text"/>

<ImageView
android:id="@+id/dialog_btn_padding"
android:layout_width="1dp"
android:layout_height="16dp"
android:layout_marginEnd="17dp"
android:layout_marginStart="17dp"
android:layout_marginTop="9dp"
android:src="@color/dialog_button_separation_color" />

<Button
android:id="@+id/dialog_ok_btn"
style="@style/DialogButton"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:textColor="@color/dialog_button_text"/>
</LinearLayout>
</LinearLayout>
34 changes: 34 additions & 0 deletions extension-iap/res/android/res/layout/progress_dialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">

<LinearLayout
android:id="@+id/body"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:padding="16dip">

<ProgressBar
style="@android:style/Widget.DeviceDefault.ProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dip"
android:layout_gravity="center_vertical"
android:text="@string/mids_sapps_body_waiting_ing"
android:textSize="@dimen/page_loading_textview_textsize"
android:fontFamily="sec-roboto-light"
android:textColor="#252525"/>

</LinearLayout>

</FrameLayout>
29 changes: 29 additions & 0 deletions extension-iap/res/android/res/layout/progress_dialog_dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dialog_radius_dark"
android:gravity="bottom"
android:orientation="vertical">

<ProgressBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="23dp"
android:indeterminateDrawable="@drawable/progress_dialog_animation_dark" />

<TextView
android:id="@+id/dialog_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="18dp"
android:layout_marginBottom="23dp"
android:lineSpacingExtra="4sp"
android:textColor="@color/dialog_message_dark"
android:textSize="16sp"
android:textAlignment="center" />
</LinearLayout>
Loading