xuguohong

重新添加公共sdk接入资料

Showing 75 changed files with 937 additions and 0 deletions
/demo/Demo_PoolSdk/gen
/demo/Demo_PoolSdk/bin
\ No newline at end of file
- 2019-09-02
- 修改PoolSdk_V2 assets/sdk assets/sdk.zip
- 2019-11-15
- libs修改PoolSdk_V2,YouYuSDK_xxx.jar为191016版本,添加miit_mdid_1.0.10.aar
- assets中添加supplierconfig.json,poolsdk.xml添加styleName字段
- 添加事件上报接口(具体查看接入文档)
- 2019-11-28
- 更新为YouYuSDK_1128.jar版本
- 2019-12-04
- 更新更新PoolSdk_V2包名,将YouYuSDK_xxx.jar替换为AppSdk_xxx.jar,替换assets下的sdk和sdk.zip
- 2019-12-19
- 更新PoolSdk_V2,删除assets中sdk/sdk.zip/sdkconfig.ini 删除AppSdk_xxx.jar,android-support-v4.jar
\ No newline at end of file
<?xml version="1.0" ?>
<config>
<sdkconfig channelparameter1="" channelparameter2="" custom="{}" gamechannelid="" gamesimplename="ces" logceportcrl="https://public.sdk.guangkatf.com/sdk/statistic" logincheckurl="https://public.sdk.guangkatf.com/logincheck/check" paycheckurl="https://public.sdk.guangkatf.com/paycheck/confirm" payorderurl="https://public.sdk.guangkatf.com/paycheck/create" sdksimplename="poolsdk" sdkversioncode="V1_0" usertype="597"/>
</config>
{
"supplier":{
"vivo":{
"appid":"100215079"
},
"xiaomi":{
},
"huawei":{
},
"oppo":{
}
}
}
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
applicationId "com.ssjh.demo"
targetSdkVersion 28
versionCode 2
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
}
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.youai.demo.shenshou">
<!-- SDK start -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<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.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- SDK end -->
<application
android:name="com.gzpublic.app.sdk.application.PoolSDKApplication"
android:allowBackup="true"
android:icon="@drawable/public_sdk_self_ic_launcher"
android:label="@string/app_name" >
<activity
android:name="com.youai.foolsdk.demo.AppActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- SDK start -->
<activity
android:name="com.appsdk.sdk.YouaiSDK"
android:label="youai_sdk"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Dialog" />
<service
android:name="com.appsdk.sdk.YouaiService"
android:enabled="true" >
<intent-filter>
<action android:name="com.youai.sdk.YouaiService" />
</intent-filter>
</service>
<receiver android:name="com.appsdk.sdk.Receiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</receiver>
<activity
android:name="com.alipay.sdk.app.H5PayActivity"
android:configChanges="keyboardHidden|navigation|orientation"
android:exported="false"
android:screenOrientation="behind" />
<activity
android:name="com.alipay.sdk.auth.AuthActivity"
android:configChanges="keyboardHidden|navigation|orientation"
android:exported="false"
android:screenOrientation="behind" />
<!-- SDK end -->
</application>
</manifest>
\ No newline at end of file
<?xml version="1.0" ?>
<config>
<sdkconfig channelparameter1="" channelparameter2="" custom="{}" gamechannelid="" gamesimplename="ces" logceportcrl="https://public.sdk.guangkatf.com/sdk/statistic" logincheckurl="https://public.sdk.guangkatf.com/logincheck/check" paycheckurl="https://public.sdk.guangkatf.com/paycheck/confirm" payorderurl="https://public.sdk.guangkatf.com/paycheck/create" sdksimplename="poolsdk" sdkversioncode="V1_0" usertype="597"/>
</config>
{
"supplier":{
"vivo":{
"appid":"100215079"
},
"xiaomi":{
},
"huawei":{
},
"oppo":{
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.youai.poolsdk.demo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<!-- SDK start -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<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.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="org.simalliance.openmobileapi.SMARTCARD" />
<uses-permission android:name="android.permission.NFC" />
<uses-feature android:name="android.hardware.nfc.hce" />
<!-- SDK end -->
<application
android:name="com.gzyouai.publicsdk.application.PoolSDKApplication"
android:allowBackup="true"
android:icon="@drawable/public_sdk_self_ic_launcher"
android:label="@string/app_name" >
<activity
android:name="com.youai.foolsdk.demo.AppActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- SDK start -->
<receiver
android:name="com.gzyouai.fengniao.sdk.framework.AppInstallReceiver"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<activity
android:name="com.youai.sdk.YouaiSDK"
android:label="youai_sdk"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Dialog" />
<service
android:name="com.youai.sdk.YouaiService"
android:enabled="true" >
<intent-filter>
<action android:name="com.youai.sdk.YouaiService" />
</intent-filter>
</service>
<service
android:name="com.youai.sdk.FloatViewService"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="com.youai.sdk.FloatViewService" />
</intent-filter>
</service>
<receiver android:name="com.youai.sdk.Receiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</receiver>
<activity
android:name="com.alipay.sdk.app.H5PayActivity"
android:configChanges="keyboardHidden|navigation|orientation"
android:exported="false"
android:screenOrientation="behind" />
<activity
android:name="com.alipay.sdk.auth.AuthActivity"
android:configChanges="keyboardHidden|navigation|orientation"
android:exported="false"
android:screenOrientation="behind" />
<activity
android:name=".wxapi.WXPayEntryActivity"
android:exported="true"
android:launchMode="singleTop" />
<activity
android:name=".wxapi.WXEntryActivity"
android:exported="true"
android:launchMode="singleTop" />
<!-- SDK end -->
</application>
</manifest>
\ No newline at end of file
No preview for this file type
No preview for this file type
# cache for current jar dependency. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8
No preview for this file type
This diff is collapsed. Click to expand it.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
android:orientation="vertical"
android:padding="5dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="vertical" >
<Button
android:id="@+id/pb_bt_login"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="登录" />
<Button
android:id="@+id/pb_bt_entergame"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="进入游戏" />
<Button
android:id="@+id/pb_bt_pay"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="支付" />
<Button
android:id="@+id/pb_bt_logout"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:text="注销" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="vertical" >
<Button
android:id="@+id/pb_bt_subrole"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="提交角色数据" />
<Button
android:id="@+id/pb_bt_openchannel"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="打开渠道个人中心" />
<Button
android:id="@+id/pb_bt_switchacc"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="切换账号" />
<Button
android:id="@+id/pb_bt_openbbs"
style="?android:attr/buttonStyleSmall"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="事件上报" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:gravity="center"
/>
<TextView
android:id="@+id/tx_sdk_msg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp" />
<TextView
android:id="@+id/tx_msg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Demo_shenshou</string>
</resources>
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
No preview for this file type
#Tue Oct 29 15:45:22 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
include ':app'
This diff is collapsed. Click to expand it.
# 公共SDK服务端接入文档
### 1.登录验证
客户端发送请求参数给服务端,服务端对参数进行 MD5 加密,如果加密结果和serverSign 一致,则验证通过,否则不通过
参数 | 类型 | 描述
------------ | ------------- | ------------
userType | int | 用户类型 ID(渠道类型,兼容以 前帐号体系)
openId | string | 平台渠道方返回用户ID
timestamp | string | 时间戳,公共SDK发送到客户端的参数timestamp, 服务端可以判断 timestamp 是否 在有效的登录时间内
serverSign | string | 验证密钥,公共 SDK 发送到 客户端的参数 serverSign,加密串:gameAppkey=%s&userType=% s&openId=%s&timestamp=%s注意:(改为游戏本身的gameAppkey值)
验证方式:
serverSign=MD5(gameAppkey=%s&userType=%s&openId=%s&timestamp=%s) 如:
md5("gameAppkey=xxxx&userType=1&openId=123&timestamp=111111111111")
gameAppkey : 在公共SDK后台的 Md5加密的KEY
`注意!CP必须要以userType+openId保证帐号唯一性`
### 2. 充值验证(通知游戏方发货)
公共SDK服务器接收到渠道服务器充值回调,对回调进行 MD5 验证,如果验证通过, 则采用Post方式马上回调给游戏充值服务器,否则不会回调充值服务器,然后再返回 信息给渠道服务器。回调参数如下:
参数 | 类型 | 描述
------------ | -------------| ------------
serverId | int | 服务器 ID
playerId | int | 角色 ID
orderId | string | 渠道方订单 ID
payAmount | double | 充值金额(如有商品 ID,此值为商 品的金额, 单位元)
currency | string | 充值货币(CNY:人民币)
goodsId | string | 商品ID,参数对一些有商品列表 的充值有效
goodsName | string | 商品名称
remoteIp | string | 客户端充值 IP
custom | string | 透传参数 ,长度 512
serverSign | string | 发给充值服务器验证的注意:(改为游戏本身的 gameAppkey 值)
uId | string | 平台渠道帐号 ID
gameSimpleName | string | 平台SDK后台游戏代号名
sdkSimpleName | string | 平台SDK代号
queryId | string | 平台SDK订单号
postTime | string | 订单创建时间戳
sign | string | 升级Md5加密的值
验证方式:
旧:serverSign=MD5(serverId=%s&playerId=%s&orderId=%s&gameAppKey=%s)
升级:sign=Md5('serverId=%s&playerId=%s&orderId=%s&payAmount=%s&goodsId=%s&sdkSimpleName=%s&gameAppKey=%s')
%s:为相应的值
gameAppkey : 在公共SDK后台的Md5加密的KEY
验证通过后,返回公共 SDK 服务器数据,数据格式:{"code":0,"message":"无订 单"}。code:0 表示失败,1 表示成功,message:描述原因。
`注意!CP必须要以orderId+sdkSimpleName保证订单唯一性,建议使用sign验证`
### 3. 充值服务器IP地址
182.254.136.76
115.159.41.44
115.159.109.183
118.89.113.235
118.89.196.17
\ No newline at end of file
## 1.魅族 ##
### 调试登录时,提示“游戏不存在”或“游戏签名不正确” ###
SDK 服务端会对参数作必要的校验,校验不通过则有此提示
1、联系运营检查该游戏是否打开了联调状态
2、联系运营检查是否创建了该游戏
3、上架后的游戏需要从游戏中心下载 APK 包进行安装
## 2.搜狗 ##
### 参数QQ_APPID要自行到QQ开放平台申请手Q ID ###
签名必须跟应用宝YSDK一致
## 3.华为 ##
### 需要母包删除 libs 中的 YouaiSDK.jar 再打包 ###
## 4.三星 ##
### 参数 waresid 为商品ID,需去三星后台设置为应用传入价格 ###
## 5.联想 ##
### waresid请到联想后台申请商品编码(使用开放价格模式) ###
## 6.UC ##
### 提交角色信息接口 ###
PoolSdkHelper.submitRoleData接口中的角色创建时间和角色等级变化时间需传正确的值,否则不过审
poolRoleInfo.setRoleChangeTime();//角色等级变化时间
poolRoleInfo.setRoleCTime();//角色创建时间
## 7.酷派 ##
### platPublicKey平台公钥默认值 ###
```
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLx50R+CpH6VD/EfavOTpHOydfAQVjvm/h/SGG/RbM/03ZDfk8JrgezyFwqX06pjKevHZz66Umoq1/3Z9oqhBlJezsM03q2woKbReGSKAPQSkuJg2FY6DdZ1v1gMuCRtF6WOHV7n2TbUvRhZugMpx8PJEV+r6Qf1L41Gt8w6FN8wIDAQAB
```
如渠道有提供以提供为准,没有填默认值
## 8.应用宝YSDK ##
### 请保留好在应用宝后台申请时使用的签名文件,打包时需使用一致的 ###
## 9.OPPO ##
### publicKey应用公钥 ###
```
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmreYIkPwVovKR8rLHWlFVw7YDfm9uQOJKL89Smt6ypXGVdrAKKl0wNYc3/jecAoPi2ylChfa2iRu5gunJyNmpWZzlCNRIau55fxGW0XEu553IiprOZcaw5OuYGlf60ga8QT6qToP0/dpiL/ZbmNUO9kUhosIjEu22uFgR+5cYyQIDAQAB
```
如渠道有提供以提供为准,没有填默认值
## 10.HTC ##
### joloPrivateKey私钥 ###
- "HTC秘钥生成工具与文档"
[https://pan.baidu.com/s/1dE7FSm1](https://pan.baidu.com/s/1dE7FSm1 "HTC秘钥生成工具与文档")
强烈建议找渠道技术帮忙生成
## 11.卓易 ##
### 1.注册账号时输入的账号密码文字颜色和输入框底色相同 ###
<Application>的theme改成android:theme="@android:style/Theme.Black.NoTitleBar"
或者把Activity的theme改成android:theme="@android:style/Theme.Black.NoTitleBar"
### 2.集成到游戏后,发现卓易悬浮图标点击没反应 ###
如果是Unity3D的游戏的话,由于Unity3D和Android之间的事件冲突,导致Android事件得不到响应。
解决办法是,需要将游戏的主Activity(游戏入口)默认继承的NativeActivity或UnityPlayerNativeActivity改为继承Activity,把UnityPlayerNativeActivity里面的方法(如下图所示)拷贝到主Activity。
现在最新Unity3D版本游戏入口也是默认继承Activity。
![](http://i.imgur.com/SlVKWAp.png)
## 12.打包 ##
参数提前确定准备好,尤其是icon,闪图那些
填写某渠道参数时,请牢记到对应渠道后台填写充值回调地址
## 13.多玩YY ##
### 支付时显示支付未成功,appid不存在 ###
因为签名不正确,在游戏提交后联运管理台后,会重新打包签名。(如不了解请与渠道联系)
## 14.360 ##
### 支付时显示Mobile pay signature invalid ###
后台填写的 QHOPENSDK_PRIVATEKEY 参数错误导致,注意此处 private_key,不是app_secret,其生成算法为 app_secret +”#”+ app_key 的加密MD5值,结果为32位全小写(http://pmd5.com/ 在线计算MD5)
![](https://i.imgur.com/JrsLmBZ.png)
如图,替换自己的 app_secret 和 app_key 即可
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type