From edf45e3bbf471194421b8c46f44941aff28dff3a Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期四, 28 十月 2021 12:22:28 +0800 Subject: [PATCH] 0312 quickbt5 --- Channel/Android/qkbt5game/release/libs/library-release-qkbt5game.aar | 0 SdkProject/channel/qkbt5game/deps.gradle | 1 新增渠道.txt | 15 +++ SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameMain.java | 90 ++++++++++++++++++++++ Channel/Android/qkbt5game/debug/libs/library-debug-qkbt5game.aar | 0 SdkProject/channel/qkbt5game/AndroidManifest.xml | 45 +++++++++++ SdkProject/channel/qkbt5game/config.properties | 1 SdkProject/channel/qkbt5game/build.gradle | 4 + SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameApp.java | 21 +++++ Channel/Android/qkbt5game/AndroidManifest.xml | 20 +++++ Channel/Android/qkbt5game/deps.gradle | 4 + SdkProject/gradle.properties | 4 SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGamePlatform.java | 19 ++++ 13 files changed, 222 insertions(+), 2 deletions(-) diff --git a/Channel/Android/qkbt5game/AndroidManifest.xml b/Channel/Android/qkbt5game/AndroidManifest.xml new file mode 100644 index 0000000..639ebb5 --- /dev/null +++ b/Channel/Android/qkbt5game/AndroidManifest.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN--> +<manifest + xmlns:android="http://schemas.android.com/apk/res/android" + package="com.unity3d.player" + xmlns:tools="http://schemas.android.com/tools"> + <application> + <activity android:name="com.secondworld.sdk.SplashActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + <activity android:name="com.secondworld.sdk.GameActivity" + android:theme="@style/UnityThemeSelector"> + <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> + </activity> + </application> +</manifest> diff --git a/Channel/Android/qkbt5game/debug/libs/library-debug-qkbt5game.aar b/Channel/Android/qkbt5game/debug/libs/library-debug-qkbt5game.aar new file mode 100644 index 0000000..78c5369 --- /dev/null +++ b/Channel/Android/qkbt5game/debug/libs/library-debug-qkbt5game.aar Binary files differ diff --git a/Channel/Android/qkbt5game/deps.gradle b/Channel/Android/qkbt5game/deps.gradle new file mode 100644 index 0000000..7526ca5 --- /dev/null +++ b/Channel/Android/qkbt5game/deps.gradle @@ -0,0 +1,4 @@ +//姝よ剼鏈负娓犻亾鐨勭涓夋柟杩滅▼渚濊禆搴撻厤缃紝浼氬鍒跺埌unity涓敤浜庢瀯寤� +dependencies { + +} diff --git a/Channel/Android/qkbt5game/release/libs/library-release-qkbt5game.aar b/Channel/Android/qkbt5game/release/libs/library-release-qkbt5game.aar new file mode 100644 index 0000000..ef2778a --- /dev/null +++ b/Channel/Android/qkbt5game/release/libs/library-release-qkbt5game.aar Binary files differ diff --git a/SdkProject/channel/qkbt5game/AndroidManifest.xml b/SdkProject/channel/qkbt5game/AndroidManifest.xml new file mode 100644 index 0000000..eea4efb --- /dev/null +++ b/SdkProject/channel/qkbt5game/AndroidManifest.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + package="com.secondworld.sdk"> + + <uses-permission android:name="android.permission.GET_TASKS" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> + <uses-permission android:name="android.permission.READ_PHONE_STATE" /> + <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> + <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> + + <application + android:name=".BtGameApp" + android:allowBackup="true" + android:usesCleartextTraffic="true" + tools:replace="android:name"> + + <meta-data + android:name="unityplayer.ForwardNativeEventsToDalvik" + android:value="true" /> + + <meta-data android:name="channelID" android:value="quicksdk_channel"/> + + <activity + android:name="com.secondworld.sdk.SplashActivity" + android:screenOrientation="sensorLandscape"> + </activity> + + <provider + android:name="android.support.v4.content.FileProvider" + android:authorities="quicksdk_packName.Provider" + android:exported="false" + android:grantUriPermissions="true"> + <meta-data + android:name="android.support.FILE_PROVIDER_PATHS" + android:resource="@xml/filepaths" /> + </provider> + + + </application> + +</manifest> \ No newline at end of file diff --git a/SdkProject/channel/qkbt5game/build.gradle b/SdkProject/channel/qkbt5game/build.gradle new file mode 100644 index 0000000..c8f58a8 --- /dev/null +++ b/SdkProject/channel/qkbt5game/build.gradle @@ -0,0 +1,4 @@ +//褰撳墠鑴氭湰涓烘笭閬撶殑宸紓鍖栭厤缃� +dependencies { +// implementation project(path: ':quick') +} \ No newline at end of file diff --git a/SdkProject/channel/qkbt5game/config.properties b/SdkProject/channel/qkbt5game/config.properties new file mode 100644 index 0000000..4218897 --- /dev/null +++ b/SdkProject/channel/qkbt5game/config.properties @@ -0,0 +1 @@ +PLUGINS=quick \ No newline at end of file diff --git a/SdkProject/channel/qkbt5game/deps.gradle b/SdkProject/channel/qkbt5game/deps.gradle new file mode 100644 index 0000000..124a6b8 --- /dev/null +++ b/SdkProject/channel/qkbt5game/deps.gradle @@ -0,0 +1 @@ +//姝よ剼鏈负娓犻亾鐨勭涓夋柟杩滅▼渚濊禆搴撻厤缃紝浼氬鍒跺埌unity涓敤浜庢瀯寤� \ No newline at end of file diff --git a/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameApp.java b/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameApp.java new file mode 100644 index 0000000..f351123 --- /dev/null +++ b/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameApp.java @@ -0,0 +1,21 @@ +package com.secondworld.sdk; + +public class BtGameApp extends QuickApp { + + @Override + public void onCreate() { + super.onCreate(); + //QuickSdkMgr.I.register("40450025922275820036898902533267","31232581"); + } + + @Override + protected PlatformDiff getPlatform() { + return new BtGamePlatform(); + } + + @Override + protected Class<? extends GameActivityProxy> getMainProxy() { + return BtGameMain.class; + } + +} diff --git a/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameMain.java b/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameMain.java new file mode 100644 index 0000000..24d8979 --- /dev/null +++ b/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGameMain.java @@ -0,0 +1,90 @@ +package com.secondworld.sdk; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.support.annotation.NonNull; +import android.view.KeyEvent; + +import com.quicksdk.QuickSDK; +import com.quicksdk.Sdk; + +public class BtGameMain extends GameActivityProxy { + + @Override + public void onCreate(Activity activity) { + super.onCreate(activity); + QuickSdkMgr.I.requestPermissions(activity); + //QuickSdkMgr.I.init(activity); + com.quicksdk.Sdk.getInstance().onCreate(activity); + } + + @Override + public void onStart() { + super.onStart(); + com.quicksdk.Sdk.getInstance().onStart(activity); + } + + @Override + public void onRestart() { + super.onRestart(); + com.quicksdk.Sdk.getInstance().onRestart(activity); + } + + @Override + public void onResume() { + super.onResume(); + com.quicksdk.Sdk.getInstance().onResume(activity); + } + + @Override + public void onStop() { + super.onStop(); + com.quicksdk.Sdk.getInstance().onStop(activity); + } + + @Override + public void onDestroy() { + super.onDestroy(); + com.quicksdk.Sdk.getInstance().onDestroy(activity); + } + + @Override + public void onNewIntent(Intent intent) { + super.onNewIntent(intent); + com.quicksdk.Sdk.getInstance().onNewIntent(intent); + } + + @Override + public void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + QuickSdkMgr.I.onActivityResult(activity, requestCode); + com.quicksdk.Sdk.getInstance().onActivityResult(activity, requestCode, resultCode, data); + } + + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + QuickSdkMgr.I.onRequestPermissionsResult(activity, requestCode, grantResults); + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_BACK) { + if (QuickSDK.getInstance().isShowExitDialog()) { + Sdk.getInstance().exit(activity); + } else { + // 娓告垙璋冪敤鑷韩鐨勯��鍑哄璇濇锛岀偣鍑荤‘瀹氬悗锛岃皟鐢╭uick鐨別xit鎺ュ彛 + new AlertDialog.Builder(activity).setTitle("閫�鍑�").setMessage("鏄惁閫�鍑烘父鎴�?").setPositiveButton("纭畾", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface arg0, int arg1) { + Sdk.getInstance().exit(activity); + } + }).setNegativeButton("鍙栨秷", null).show(); + } + return true; + } + return super.onKeyDown(keyCode, event); + } +} diff --git a/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGamePlatform.java b/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGamePlatform.java new file mode 100644 index 0000000..c2f810e --- /dev/null +++ b/SdkProject/channel/qkbt5game/java/com/secondworld/sdk/BtGamePlatform.java @@ -0,0 +1,19 @@ + package com.secondworld.sdk; + +public class BtGamePlatform extends PlatformDiff { + + @Override + public String platformName() { + return "quick"; + } + + @Override + public String platformProductCode() { + return "29867800160198523830628191813245"; + } + + @Override + public String platformProductKey() { + return "13281292"; + } +} diff --git a/SdkProject/gradle.properties b/SdkProject/gradle.properties index 227ba29..fb1f711 100644 --- a/SdkProject/gradle.properties +++ b/SdkProject/gradle.properties @@ -12,10 +12,10 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK +# Android operating system, and which are packaged with your app"s APK 路 # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=false ## Automatically convert third-party libraries to use AndroidX android.enableJetifier=false #褰撳墠鏋勫缓鐨勬笭閬撳悕绉� -CHANNEL_NAME=qkbt4game +CHANNEL_NAME=qkbt5game diff --git "a/\346\226\260\345\242\236\346\270\240\351\201\223.txt" "b/\346\226\260\345\242\236\346\270\240\351\201\223.txt" new file mode 100644 index 0000000..02917b3 --- /dev/null +++ "b/\346\226\260\345\242\236\346\270\240\351\201\223.txt" @@ -0,0 +1,15 @@ +1. android + a.鏂板缓妯″潡-android lib - 鍙傝�冨叾涓竴涓洿鎺ユ嫹璐濇墍鏈変唬鐮�- 鏀瑰搴旂殑娓犻亾鍚� + b.鎷疯礉澶栧眰涓や釜diff鏂囦欢澶� 鍒犻櫎澶氫綑aar + c.鏇挎崲 code鍜宬ey锛屽鏈夐�昏緫鍙樻洿鏍规嵁闇�姹備慨鏀� + d.sync gradle- 缂栬瘧 + +2.ios + a. 鎷疯礉涓�浠藉弬鑰�- 鏀规笭閬撳悕 + b. 鏇挎崲 code鍜宬ey锛屽鏈夐�昏緫鍙樻洿鏍规嵁闇�姹備慨鏀� + c. 璧版墦鍖呮祦绋� + +=================================================== +鏂癆S鎿嶄綔 +鍙鎷疯礉鏃х殑妯″潡 濡俢hannel/qkbt4game +gradle缂栬瘧鏀规垚 CHANNEL_NAME=qkbt4game \ No newline at end of file -- Gitblit v1.8.0