update:enjoy-pay 接入
This commit is contained in:
47
ExtraPluginCfgs/Android/enjoypay/AndroidManifest.xml
Normal file
47
ExtraPluginCfgs/Android/enjoypay/AndroidManifest.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.arkgame.ft.ep"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<application android:extractNativeLibs="true" android:name="com.unity3d.player.TYApp" android:usesCleartextTraffic="true">
|
||||
<activity android:name="com.unity3d.player.TYUnityActivity"
|
||||
android:theme="@style/UnityThemeSelector">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" android:host="fishingtraveliae.onelink.me" android:pathPrefix="/jT1Q"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:host="mainactivity" android:scheme="zzft" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
|
||||
|
||||
<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="true" />
|
||||
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="true" />
|
||||
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="true" />
|
||||
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="true" />
|
||||
</activity>
|
||||
<meta-data android:name="CHANNEL" android:value="EnjoyPay" />
|
||||
</application>
|
||||
<queries>
|
||||
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
|
||||
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
|
||||
<intent>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
13
ExtraPluginCfgs/Android/enjoypay/ChannelEntry.java
Normal file
13
ExtraPluginCfgs/Android/enjoypay/ChannelEntry.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.unity3d.player;
|
||||
|
||||
public class ChannelEntry {
|
||||
public static final String CHANNEL = "EnjoyPay";
|
||||
|
||||
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String normalizeSkuList(String msg) {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
26
ExtraPluginCfgs/Android/enjoypay/ConfigManager.java
Normal file
26
ExtraPluginCfgs/Android/enjoypay/ConfigManager.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.unity3d.player;
|
||||
|
||||
public class ConfigManager {
|
||||
// Common SDK parameters
|
||||
public static int SDK_APPID = 20587;
|
||||
public static String SDK_GAMEID = "20587";
|
||||
public static String SDK_PROJECTID = "20587";
|
||||
public static String SDK_CLOUDID = "128";
|
||||
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.googleplay.FishingMasterRussia";
|
||||
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
|
||||
// FCM (anti-addiction system)
|
||||
public static String FCM_NAMESPACE = "128";
|
||||
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
|
||||
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
|
||||
// Unity Facade callback names
|
||||
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
|
||||
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
|
||||
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
|
||||
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
|
||||
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
|
||||
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
|
||||
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
|
||||
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
|
||||
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
|
||||
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
|
||||
}
|
||||
29
ExtraPluginCfgs/Android/enjoypay/Files/google-services.json
Normal file
29
ExtraPluginCfgs/Android/enjoypay/Files/google-services.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "404468630883",
|
||||
"project_id": "fishing-travel-ep-1ab1e",
|
||||
"storage_bucket": "fishing-travel-ep-1ab1e.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:404468630883:android:de3cb115158a5e4cdfff56",
|
||||
"android_client_info": {
|
||||
"package_name": "com.arkgame.ft.ep"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAL8YVO4U6A9WRiQ581Et0o-BmtMf3k7Hg"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
Binary file not shown.
11
ExtraPluginCfgs/Android/enjoypay/gradleTemplate.properties
Normal file
11
ExtraPluginCfgs/Android/enjoypay/gradleTemplate.properties
Normal file
@@ -0,0 +1,11 @@
|
||||
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
|
||||
org.gradle.parallel=true
|
||||
unityStreamingAssets=**STREAMING_ASSETS**
|
||||
# Android Resolver Properties Start
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Android Resolver Properties End
|
||||
|
||||
android.suppressUnsupportedCompileSdk=35
|
||||
|
||||
**ADDITIONAL_PROPERTIES**
|
||||
65
ExtraPluginCfgs/Android/enjoypay/launcherTemplate.gradle
Normal file
65
ExtraPluginCfgs/Android/enjoypay/launcherTemplate.gradle
Normal file
@@ -0,0 +1,65 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
dependencies {
|
||||
implementation project(':unityLibrary')
|
||||
implementation(platform("com.google.firebase:firebase-bom:33.6.0"))
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "**NAMESPACE**"
|
||||
ndkPath "**NDKPATH**"
|
||||
|
||||
compileSdkVersion **APIVERSION**
|
||||
buildToolsVersion '**BUILDTOOLS**'
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion **MINSDKVERSION**
|
||||
targetSdkVersion **TARGETSDKVERSION**
|
||||
applicationId '**APPLICATIONID**'
|
||||
ndk {
|
||||
abiFilters **ABIFILTERS**
|
||||
}
|
||||
versionCode **VERSIONCODE**
|
||||
versionName '**VERSIONNAME**'
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
|
||||
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
|
||||
}**SIGN**
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled **MINIFY_DEBUG**
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
|
||||
jniDebuggable true
|
||||
}
|
||||
release {
|
||||
minifyEnabled **MINIFY_RELEASE**
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
|
||||
}
|
||||
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
|
||||
**BUILT_APK_LOCATION**
|
||||
bundle {
|
||||
language {
|
||||
enableSplit = false
|
||||
}
|
||||
density {
|
||||
enableSplit = false
|
||||
}
|
||||
abi {
|
||||
enableSplit = true
|
||||
}
|
||||
}
|
||||
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**
|
||||
112
ExtraPluginCfgs/Android/enjoypay/mainTemplate.gradle
Normal file
112
ExtraPluginCfgs/Android/enjoypay/mainTemplate.gradle
Normal file
@@ -0,0 +1,112 @@
|
||||
apply plugin: 'com.android.library'
|
||||
**APPLY_PLUGINS**
|
||||
|
||||
// Android Resolver Exclusions Start
|
||||
android {
|
||||
packagingOptions {
|
||||
exclude ('/lib/armeabi/*' + '*')
|
||||
exclude ('/lib/mips/*' + '*')
|
||||
exclude ('/lib/mips64/*' + '*')
|
||||
exclude ('/lib/x86/*' + '*')
|
||||
exclude ('/lib/x86_64/*' + '*')
|
||||
}
|
||||
}
|
||||
// Android Resolver Exclusions End
|
||||
android {
|
||||
namespace "com.unity3d.player"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
api "com.android.support:support-v4:28.0.0"
|
||||
api "com.android.support:appcompat-v7:28.0.0"
|
||||
|
||||
api "com.google.code.gson:gson:2.8.6"
|
||||
api "com.squareup.okio:okio:1.15.0"
|
||||
api "com.squareup.okhttp3:okhttp:3.12.13"
|
||||
api "com.squareup.retrofit2:retrofit:2.3.0"
|
||||
api "com.squareup.retrofit2:converter-gson:2.2.0"
|
||||
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
|
||||
api "io.reactivex:rxandroid:1.2.1"
|
||||
api "io.reactivex:rxjava:1.1.9"
|
||||
|
||||
// Google Play In-App Review
|
||||
implementation 'com.google.android.play:review:2.0.1'
|
||||
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
|
||||
|
||||
implementation 'com.google.android.gms:play-services-auth:20.2.0'
|
||||
implementation('com.android.billingclient:billing:7.0.0')
|
||||
|
||||
implementation 'com.google.android.gms:play-services-basement:18.2.0'
|
||||
implementation 'androidx.fragment:fragment:1.3.6'
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
|
||||
implementation 'androidx.core:core:1.8.0'
|
||||
|
||||
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
|
||||
|
||||
implementation platform('com.google.firebase:firebase-bom:34.6.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
|
||||
implementation('com.facebook.android:facebook-android-sdk:16.2.0')
|
||||
|
||||
implementation 'com.google.android.play:asset-delivery:2.2.2'
|
||||
|
||||
implementation "androidx.credentials:credentials:1.3.0"
|
||||
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
|
||||
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
|
||||
|
||||
// EnjoyPay SDK dependency goes here after the official Maven/AAR coordinates are confirmed.
|
||||
|
||||
// Android Resolver Dependencies Start
|
||||
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
|
||||
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
|
||||
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
|
||||
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
|
||||
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
|
||||
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
|
||||
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
|
||||
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
|
||||
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
|
||||
implementation 'com.appsflyer:purchase-connector:2.2.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:8
|
||||
implementation 'com.appsflyer:unity-wrapper:6.17.7' // Assets/AppsFlyer/Editor/Dependencies.xml:6
|
||||
implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5
|
||||
// Android Resolver Dependencies End
|
||||
**DEPS**}
|
||||
|
||||
android {
|
||||
ndkPath "**NDKPATH**"
|
||||
|
||||
compileSdkVersion **APIVERSION**
|
||||
buildToolsVersion '**BUILDTOOLS**'
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion **MINSDKVERSION**
|
||||
targetSdkVersion **TARGETSDKVERSION**
|
||||
ndk {
|
||||
abiFilters **ABIFILTERS**
|
||||
}
|
||||
versionCode **VERSIONCODE**
|
||||
versionName '**VERSIONNAME**'
|
||||
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
|
||||
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
|
||||
}**PACKAGING_OPTIONS**
|
||||
}
|
||||
**IL_CPP_BUILD_SETUP**
|
||||
**SOURCE_BUILD_SETUP**
|
||||
**EXTERNAL_SOURCES**
|
||||
35
ExtraPluginCfgs/Android/enjoypay/settingsTemplate.gradle
Normal file
35
ExtraPluginCfgs/Android/enjoypay/settingsTemplate.gradle
Normal file
@@ -0,0 +1,35 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
**ARTIFACTORYREPOSITORY**
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
include ':launcher', ':unityLibrary'
|
||||
**INCLUDES**
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||
repositories {
|
||||
**ARTIFACTORYREPOSITORY**
|
||||
google()
|
||||
mavenCentral()
|
||||
// Android Resolver Repos Start
|
||||
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
|
||||
maven {
|
||||
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Dependencies.xml:8
|
||||
}
|
||||
mavenLocal()
|
||||
// Android Resolver Repos End
|
||||
flatDir {
|
||||
dirs "${project(':unityLibrary').projectDir}/libs"
|
||||
}
|
||||
|
||||
maven {
|
||||
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Usage: ./switch-channel.sh <channel>
|
||||
# channel: googleplay | flexion | rustore
|
||||
#
|
||||
# 切换渠道后重新用 Unity 打 Android 包即可打出对应渠道的 APK。
|
||||
# 脚本会同步:AAR、Gradle 配置、AndroidManifest、Java 文件(ConfigManager、ChannelHelpers 等)
|
||||
|
||||
CHANNEL=${1:-googleplay}
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
CHANNEL_DIR="$SCRIPT_DIR/$CHANNEL"
|
||||
PROJ_DIR="$SCRIPT_DIR/../../sdk-intergration"
|
||||
|
||||
TYSDK_PLUGINS="$PROJ_DIR/Packages/tysdk/Plugins/Android"
|
||||
ASSETS_PLUGINS="$PROJ_DIR/Assets/Plugins/Android"
|
||||
|
||||
# 校验渠道目录
|
||||
if [ ! -d "$CHANNEL_DIR" ]; then
|
||||
echo "ERROR: Unknown channel '$CHANNEL'. Available: googleplay, flexion, rustore"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=== Switching to channel: $CHANNEL ==="
|
||||
|
||||
# 1. Sync channel AAR to tysdk package (only tuyoosdk, gasdk stays permanently)
|
||||
echo "[AAR] Syncing tuyoosdk to $TYSDK_PLUGINS"
|
||||
find "$TYSDK_PLUGINS" -maxdepth 1 -name "tuyoosdk_*.aar" -delete
|
||||
cp "$CHANNEL_DIR/Plugins/Android/"*.aar "$TYSDK_PLUGINS/" 2>/dev/null
|
||||
|
||||
# 2. Sync Gradle + Manifest to Assets/Plugins/Android
|
||||
echo "[Config] Syncing gradle/manifest to $ASSETS_PLUGINS"
|
||||
for f in "$CHANNEL_DIR"/*.gradle "$CHANNEL_DIR"/*.properties "$CHANNEL_DIR"/AndroidManifest.xml; do
|
||||
[ -f "$f" ] && cp "$f" "$ASSETS_PLUGINS/"
|
||||
done
|
||||
|
||||
# 3. Sync Java files to tysdk package
|
||||
echo "[Java] Syncing ConfigManager + ChannelHelpers to $TYSDK_PLUGINS"
|
||||
for f in "$CHANNEL_DIR"/*.java; do
|
||||
[ -f "$f" ] && cp "$f" "$TYSDK_PLUGINS/"
|
||||
done
|
||||
|
||||
echo "=== Done. Channel: $CHANNEL ==="
|
||||
echo ""
|
||||
echo "Next: Open Unity and build Android APK."
|
||||
Reference in New Issue
Block a user