Commit 41d220c11efda8f6c14e7c4d5b19842d8ea4181b
1 parent
d6bc71fcb5
Exists in
master
update to 4.1.1:add a paramter to the url of the Web page that fb login
Showing 7 changed files with 26 additions and 7 deletions Inline Diff
GameSDK-release4.1.0.aar
No preview for this file type
GameSDK-release4.1.1.aar
No preview for this file type
GameSDKDemo/GameSDKDemo.iml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <module external.linked.project.id=":GameSDKDemo" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../../GameSDK_AS" external.system.id="GRADLE" external.system.module.group="GameSDK_AS" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> | 2 | <module external.linked.project.id=":GameSDKDemo" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../../GameSDK_AS" external.system.id="GRADLE" external.system.module.group="GameSDK_AS" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> |
3 | <component name="FacetManager"> | 3 | <component name="FacetManager"> |
4 | <facet type="android-gradle" name="Android-Gradle"> | 4 | <facet type="android-gradle" name="Android-Gradle"> |
5 | <configuration> | 5 | <configuration> |
6 | <option name="GRADLE_PROJECT_PATH" value=":GameSDKDemo" /> | 6 | <option name="GRADLE_PROJECT_PATH" value=":GameSDKDemo" /> |
7 | </configuration> | 7 | </configuration> |
8 | </facet> | 8 | </facet> |
9 | <facet type="android" name="Android"> | 9 | <facet type="android" name="Android"> |
10 | <configuration> | 10 | <configuration> |
11 | <option name="SELECTED_BUILD_VARIANT" value="debug" /> | 11 | <option name="SELECTED_BUILD_VARIANT" value="debug" /> |
12 | <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> | 12 | <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> |
13 | <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> | 13 | <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> |
14 | <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> | 14 | <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> |
15 | <afterSyncTasks> | 15 | <afterSyncTasks> |
16 | <task>generateDebugSources</task> | 16 | <task>generateDebugSources</task> |
17 | </afterSyncTasks> | 17 | </afterSyncTasks> |
18 | <option name="ALLOW_USER_CONFIGURATION" value="false" /> | 18 | <option name="ALLOW_USER_CONFIGURATION" value="false" /> |
19 | <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> | 19 | <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> |
20 | <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> | 20 | <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> |
21 | <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> | 21 | <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> |
22 | <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> | 22 | <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> |
23 | </configuration> | 23 | </configuration> |
24 | </facet> | 24 | </facet> |
25 | </component> | 25 | </component> |
26 | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> | 26 | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> |
27 | <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> | 27 | <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> |
28 | <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" /> | 28 | <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" /> |
29 | <exclude-output /> | 29 | <exclude-output /> |
30 | <content url="file://$MODULE_DIR$"> | 30 | <content url="file://$MODULE_DIR$"> |
31 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> | 31 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> |
32 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> | 32 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> |
33 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> | 33 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> |
34 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> | 34 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> |
35 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" /> | 35 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" /> |
36 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> | 36 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> |
37 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> | 37 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> |
38 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> | 38 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> |
39 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> | 39 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> |
40 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> | 40 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> |
41 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> | 41 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> |
42 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" /> | 42 | <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" /> |
43 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> | 43 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> |
44 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> | 44 | <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> |
45 | <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> | 45 | <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> |
46 | <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> | 46 | <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> |
47 | <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> | 47 | <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> |
48 | <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> | 48 | <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> |
49 | <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> | 49 | <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> |
50 | <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> | 50 | <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> |
51 | <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> | 51 | <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> |
52 | <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" /> | 52 | <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" /> |
53 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" /> | 53 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" /> |
54 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" /> | 54 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" /> |
55 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" /> | 55 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" /> |
56 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" /> | 56 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" /> |
57 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" /> | 57 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" /> |
58 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" /> | 58 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" /> |
59 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" /> | 59 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" /> |
60 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" /> | 60 | <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" /> |
61 | <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> | 61 | <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> |
62 | <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | 62 | <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
63 | <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> | 63 | <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> |
64 | <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> | 64 | <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> |
65 | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | 65 | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
66 | <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> | 66 | <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> |
67 | <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> | 67 | <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> |
68 | <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> | 68 | <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> |
69 | <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" /> | 69 | <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" /> |
70 | <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> | 70 | <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> |
71 | <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" /> | 71 | <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" /> |
72 | <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" /> | 72 | <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" /> |
73 | <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | 73 | <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
74 | <sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" /> | 74 | <sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" /> |
75 | <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" /> | 75 | <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" /> |
76 | <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> | 76 | <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> |
77 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> | 77 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> |
78 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> | 78 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> |
79 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> | 79 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> |
80 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> | 80 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> |
81 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> | 81 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> |
82 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> | 82 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> |
83 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> | 83 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> |
84 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> | 84 | <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> |
85 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> | ||
85 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> | 86 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> |
87 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" /> | ||
88 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> | ||
89 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> | ||
90 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/GameSDK-release4.1.1/jars" /> | ||
86 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" /> | 91 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" /> |
87 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" /> | 92 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" /> |
88 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> | 93 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> |
94 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" /> | ||
95 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" /> | ||
96 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" /> | ||
97 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" /> | ||
98 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" /> | ||
99 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" /> | ||
100 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" /> | ||
89 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> | 101 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> |
102 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> | ||
103 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" /> | ||
90 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> | 104 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> |
105 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" /> | ||
91 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> | 106 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> |
107 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" /> | ||
92 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> | 108 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> |
109 | <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" /> | ||
93 | <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> | 110 | <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> |
111 | <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> | ||
94 | </content> | 112 | </content> |
95 | <orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" /> | 113 | <orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" /> |
96 | <orderEntry type="sourceFolder" forTests="false" /> | 114 | <orderEntry type="sourceFolder" forTests="false" /> |
97 | <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" /> | 115 | <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" /> |
98 | <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" /> | 116 | <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" /> |
99 | <orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" /> | 117 | <orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" /> |
100 | <orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" /> | 118 | <orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" /> |
119 | <orderEntry type="library" exported="" name="GameSDK-release4.1.1-" level="project" /> | ||
101 | <orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" /> | 120 | <orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" /> |
102 | <orderEntry type="module" module-name="GameSDK" exported="" /> | ||
103 | <orderEntry type="library" exported="" name="image-cache" level="project" /> |
GameSDKDemo/build.gradle
1 | apply plugin: 'com.android.application' | 1 | apply plugin: 'com.android.application' |
2 | 2 | ||
3 | repositories{ | 3 | repositories{ |
4 | flatDir{ | 4 | flatDir{ |
5 | dirs 'libs' | 5 | dirs 'libs' |
6 | } | 6 | } |
7 | } | 7 | } |
8 | 8 | ||
9 | android { | 9 | android { |
10 | compileSdkVersion 22 | 10 | compileSdkVersion 22 |
11 | buildToolsVersion "22.0.0" | 11 | buildToolsVersion "22.0.0" |
12 | 12 | ||
13 | 13 | ||
14 | defaultConfig { | 14 | defaultConfig { |
15 | minSdkVersion 9 | 15 | minSdkVersion 9 |
16 | targetSdkVersion 22 | 16 | targetSdkVersion 22 |
17 | versionCode 1 | 17 | versionCode 1 |
18 | versionName "1.0" | 18 | versionName "1.0" |
19 | } | 19 | } |
20 | 20 | ||
21 | buildTypes { | 21 | buildTypes { |
22 | release { | 22 | release { |
23 | minifyEnabled false | 23 | minifyEnabled false |
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | 24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
25 | } | 25 | } |
26 | } | 26 | } |
27 | lintOptions{ | 27 | lintOptions{ |
28 | abortOnError false | 28 | abortOnError false |
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | dependencies { | 32 | dependencies { |
33 | compile fileTree(dir: 'libs', include: ['*.jar']) | 33 | compile fileTree(dir: 'libs', include: ['*.jar']) |
34 | testCompile 'junit:junit:4.12' | 34 | testCompile 'junit:junit:4.12' |
35 | compile 'com.android.support:appcompat-v7:22.2.0' | 35 | compile 'com.android.support:appcompat-v7:22.2.0' |
36 | compile project(':GameSDK') | 36 | // compile project(':GameSDK') |
37 | // compile(name:'GameSDK-release',ext:'aar') | 37 | compile(name:'GameSDK-release4.1.1',ext:'aar') |
38 | } | 38 | } |
39 | 39 |
GameSDKDemo/libs/GameSDK-release4.1.0.aar
No preview for this file type
GameSDKDemo/libs/GameSDK-release4.1.1.aar
No preview for this file type
GameSDKDemo/src/main/java/com/gumptech/sdk/demo/MainActivity.java
1 | package com.gumptech.sdk.demo; | 1 | package com.gumptech.sdk.demo; |
2 | 2 | ||
3 | import android.app.Activity; | 3 | import android.app.Activity; |
4 | import android.content.Context; | 4 | import android.content.Context; |
5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
6 | import android.text.ClipboardManager; | 6 | import android.text.ClipboardManager; |
7 | import android.util.Log; | 7 | import android.util.Log; |
8 | import android.view.View; | 8 | import android.view.View; |
9 | import android.widget.Button; | 9 | import android.widget.Button; |
10 | import android.widget.TextView; | 10 | import android.widget.TextView; |
11 | import android.widget.Toast; | 11 | import android.widget.Toast; |
12 | 12 | ||
13 | import com.gumptech.sdk.GumpPreference; | 13 | import com.gumptech.sdk.GumpPreference; |
14 | import com.gumptech.sdk.GumpSDK; | 14 | import com.gumptech.sdk.GumpSDK; |
15 | import com.gumptech.sdk.bean.GumpUser; | 15 | import com.gumptech.sdk.bean.GumpUser; |
16 | import com.gumptech.sdk.bean.PurchaseResult; | 16 | import com.gumptech.sdk.bean.PurchaseResult; |
17 | import com.gumptech.sdk.callback.InitializeCallback; | 17 | import com.gumptech.sdk.callback.InitializeCallback; |
18 | import com.gumptech.sdk.callback.LoginStateListener; | 18 | import com.gumptech.sdk.callback.LoginStateListener; |
19 | import com.gumptech.sdk.callback.PurchaseCallback; | 19 | import com.gumptech.sdk.callback.PurchaseCallback; |
20 | import com.gumptech.sdk.passport.fb.FBAccessToken; | ||
20 | 21 | ||
21 | public class MainActivity extends Activity implements PurchaseCallback{ | 22 | public class MainActivity extends Activity implements PurchaseCallback{ |
22 | 23 | ||
23 | private static final String TAG = "MainActivity"; | 24 | private static final String TAG = "MainActivity"; |
24 | 25 | ||
25 | private TextView tvVersion; | 26 | private TextView tvVersion; |
26 | private TextView userInfo; | 27 | private TextView userInfo; |
27 | 28 | ||
28 | private Button btnLoginOrLogout; | 29 | private Button btnLoginOrLogout; |
29 | 30 | ||
30 | private String appId = "10056"; | 31 | private String appId = "10022"; |
31 | private String appKey = "b59c21a078fde074a6750e91ed19fb21"; | 32 | private String appKey = "93a27b0bd99bac3e68a440b48aa421ab"; |
32 | private String sessionKey; | 33 | private String sessionKey; |
33 | 34 | ||
34 | @Override | 35 | @Override |
35 | protected void onCreate(Bundle savedInstanceState) { | 36 | protected void onCreate(Bundle savedInstanceState) { |
36 | super.onCreate(savedInstanceState); | 37 | super.onCreate(savedInstanceState); |
37 | setContentView(R.layout.activity_main); | 38 | setContentView(R.layout.activity_main); |
38 | tvVersion = (TextView) findViewById(R.id.version); | 39 | tvVersion = (TextView) findViewById(R.id.version); |
39 | userInfo = (TextView) findViewById(R.id.user_info); | 40 | userInfo = (TextView) findViewById(R.id.user_info); |
40 | btnLoginOrLogout = (Button) findViewById(R.id.login_or_logout); | 41 | btnLoginOrLogout = (Button) findViewById(R.id.login_or_logout); |
41 | btnLoginOrLogout.setOnClickListener(new View.OnClickListener() { | 42 | btnLoginOrLogout.setOnClickListener(new View.OnClickListener() { |
42 | 43 | ||
43 | @Override | 44 | @Override |
44 | public void onClick(View v) { | 45 | public void onClick(View v) { |
45 | if (btnLoginOrLogout.getTag() == null || (Integer) btnLoginOrLogout.getTag() == 0) | 46 | if (btnLoginOrLogout.getTag() == null || (Integer) btnLoginOrLogout.getTag() == 0) |
46 | GumpSDK.start(MainActivity.this); | 47 | GumpSDK.start(MainActivity.this); |
47 | else | 48 | else |
48 | GumpSDK.logout(MainActivity.this); | 49 | GumpSDK.logout(MainActivity.this); |
49 | } | 50 | } |
50 | }); | 51 | }); |
51 | findViewById(R.id.pay).setOnClickListener(new View.OnClickListener() { | 52 | findViewById(R.id.pay).setOnClickListener(new View.OnClickListener() { |
52 | 53 | ||
53 | @Override | 54 | @Override |
54 | public void onClick(View v) { | 55 | public void onClick(View v) { |
55 | Bundle payInfo = new Bundle(); | 56 | Bundle payInfo = new Bundle(); |
56 | payInfo.putString("nick", "thi"); | 57 | payInfo.putString("nick", "thi"); |
57 | payInfo.putString("product", "test2"); | 58 | payInfo.putString("product", "test2"); |
58 | payInfo.putFloat("amount", 0.1f); | 59 | payInfo.putFloat("amount", 0.1f); |
59 | payInfo.putString("extraInfo", "This is demo!"); | 60 | payInfo.putString("extraInfo", "This is demo!"); |
60 | payInfo.putString("serverId", "100"); | 61 | payInfo.putString("serverId", "100"); |
61 | payInfo.putString("sessionKey", sessionKey); | 62 | payInfo.putString("sessionKey", sessionKey); |
62 | GumpSDK.pay(MainActivity.this, payInfo, MainActivity.this); | 63 | GumpSDK.pay(MainActivity.this, payInfo, MainActivity.this); |
63 | } | 64 | } |
64 | }); | 65 | }); |
65 | /** | 66 | /** |
66 | * 设置否是打印debug日志 | 67 | * 设置否是打印debug日志 |
67 | */ | 68 | */ |
68 | GumpSDK.getSettings().enableDebugLogging(true); | 69 | GumpSDK.getSettings().enableDebugLogging(true); |
69 | /** | 70 | /** |
70 | * 设置是否启用facebook登录 | 71 | * 设置是否启用facebook登录 |
71 | */ | 72 | */ |
72 | GumpSDK.getSettings().setFBEnable(true); | 73 | GumpSDK.getSettings().setFBEnable(true); |
73 | /** | 74 | /** |
74 | * 设置是否启用Vk登录 | 75 | * 设置是否启用Vk登录 |
75 | */ | 76 | */ |
76 | GumpSDK.getSettings().setVKEnable(false); | 77 | GumpSDK.getSettings().setVKEnable(false); |
77 | /** | 78 | /** |
78 | * 设置屏幕方向 | 79 | * 设置屏幕方向 |
79 | */ | 80 | */ |
80 | GumpSDK.getSettings().setScreenLandscape(true); | 81 | GumpSDK.getSettings().setScreenLandscape(true); |
81 | /** | 82 | /** |
82 | * 设置用户登录状态监听器 | 83 | * 设置用户登录状态监听器 |
83 | */ | 84 | */ |
84 | 85 | ||
85 | GumpSDK.setUserStateListener(new LoginStateListener() { | 86 | GumpSDK.setUserStateListener(new LoginStateListener() { |
86 | @Override | 87 | @Override |
87 | public void onLoginSuccess(GumpUser user) { | 88 | public void onLoginSuccess(GumpUser user) { |
88 | ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); | 89 | ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); |
89 | cm.setText(user.getSessionKey()); | 90 | cm.setText(user.getSessionKey()); |
90 | sessionKey = user.getSessionKey(); | 91 | sessionKey = user.getSessionKey(); |
91 | String userType=null; | 92 | String userType=null; |
92 | switch(user.getAccountType()){ | 93 | switch(user.getAccountType()){ |
93 | case GumpPreference.ACCOUNT_TYPE_FB: | 94 | case GumpPreference.ACCOUNT_TYPE_FB: |
94 | userType = "Facebook登录"; | 95 | userType = "Facebook登录"; |
96 | String fbToken = FBAccessToken.getCurrentAccessToken().getToken(); | ||
97 | Log.d(TAG,"FBAccessToken:"+fbToken); | ||
95 | break; | 98 | break; |
96 | case GumpPreference.ACCOUNT_TYPE_QUICK_REG: | 99 | case GumpPreference.ACCOUNT_TYPE_QUICK_REG: |
97 | userType = "快速登录"; | 100 | userType = "快速登录"; |
98 | break; | 101 | break; |
99 | case GumpPreference.ACCOUNT_TYPE_REG: | 102 | case GumpPreference.ACCOUNT_TYPE_REG: |
100 | userType = "gump注册用户"; | 103 | userType = "gump注册用户"; |
101 | break; | 104 | break; |
102 | case GumpPreference.ACCOUNT_TYPE_VK: | 105 | case GumpPreference.ACCOUNT_TYPE_VK: |
103 | userType = "vk登录"; | 106 | userType = "vk登录"; |
104 | break; | 107 | break; |
105 | } | 108 | } |
106 | userInfo.setText(" Userid:" + user.getUid() + "\n accountType:(" + user.getAccountType()+") "+userType + "\n sessionKey:" + user.getSessionKey()); | 109 | userInfo.setText(" Userid:" + user.getUid() + "\n accountType:(" + user.getAccountType()+") "+userType + "\n sessionKey:" + user.getSessionKey()); |
107 | btnLoginOrLogout.setText("Logout"); | 110 | btnLoginOrLogout.setText("Logout"); |
108 | btnLoginOrLogout.setTag(1); | 111 | btnLoginOrLogout.setTag(1); |
109 | } | 112 | } |
110 | 113 | ||
111 | @Override | 114 | @Override |
112 | public void onLoginFailed(int code, String msg) { | 115 | public void onLoginFailed(int code, String msg) { |
113 | userInfo.setText(msg); | 116 | userInfo.setText(msg); |
114 | Toast.makeText(MainActivity.this, "Login failed:code="+code+",message="+msg, Toast.LENGTH_SHORT).show(); | 117 | Toast.makeText(MainActivity.this, "Login failed:code="+code+",message="+msg, Toast.LENGTH_SHORT).show(); |
115 | } | 118 | } |
116 | 119 | ||
117 | @Override | 120 | @Override |
118 | public void onLoginCanceled() { | 121 | public void onLoginCanceled() { |
119 | Toast.makeText(MainActivity.this, "operate be canceled", Toast.LENGTH_SHORT).show(); | 122 | Toast.makeText(MainActivity.this, "operate be canceled", Toast.LENGTH_SHORT).show(); |
120 | } | 123 | } |
121 | 124 | ||
122 | @Override | 125 | @Override |
123 | public void onLogout() { | 126 | public void onLogout() { |
124 | btnLoginOrLogout.setText("Login"); | 127 | btnLoginOrLogout.setText("Login"); |
125 | btnLoginOrLogout.setTag(0); | 128 | btnLoginOrLogout.setTag(0); |
126 | userInfo.setText("User is logout"); | 129 | userInfo.setText("User is logout"); |
127 | } | 130 | } |
128 | }); | 131 | }); |
129 | /** | 132 | /** |
130 | * 初始化sdk | 133 | * 初始化sdk |
131 | */ | 134 | */ |
132 | GumpSDK.init(getApplicationContext(), appId, appKey, "1000", new InitializeCallback() { | 135 | GumpSDK.init(getApplicationContext(), appId, appKey, "1000", new InitializeCallback() { |
133 | @Override | 136 | @Override |
134 | public void initComplete(int result) { | 137 | public void initComplete(int result) { |
135 | if (result == GumpSDK.CODE.OK) { | 138 | if (result == GumpSDK.CODE.OK) { |
136 | btnLoginOrLogout.setEnabled(true); | 139 | btnLoginOrLogout.setEnabled(true); |
137 | } | 140 | } |
138 | } | 141 | } |
139 | }); | 142 | }); |
140 | 143 | ||
141 | tvVersion.setText("SDK Version:" + GumpSDK.getVersion()); | 144 | tvVersion.setText("SDK Version:" + GumpSDK.getVersion()); |
142 | } | 145 | } |
143 | 146 | ||
144 | @Override | 147 | @Override |
145 | public void onPurchaseCompleted(PurchaseResult result) { | 148 | public void onPurchaseCompleted(PurchaseResult result) { |
146 | Log.i(TAG,"purchase completed"); | 149 | Log.i(TAG,"purchase completed"); |
147 | } | 150 | } |
148 | 151 | ||
149 | @Override | 152 | @Override |
150 | public void onPurchaseError(int code, String msg) { | 153 | public void onPurchaseError(int code, String msg) { |
151 | Log.i(TAG,"purchase error"); | 154 | Log.i(TAG,"purchase error"); |
152 | } | 155 | } |
153 | 156 | ||
154 | @Override | 157 | @Override |
155 | public void onPurchaseCanceled() { | 158 | public void onPurchaseCanceled() { |
156 | Log.i(TAG,"purchase canceled"); | 159 | Log.i(TAG,"purchase canceled"); |
157 | } | 160 | } |
158 | } | 161 | } |
159 | 162 |