提交 265ad907 编写于 作者: haililiu's avatar haililiu 🎨

create

上级 a07fc895

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<component name="CopyrightManager">
<settings default="" />
</component>
\ 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="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" 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>
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/AndroidProject.iml" filepath="$PROJECT_DIR$/AndroidProject.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</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="" vcs="svn" />
</component>
</project>
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile files('libs/classes.jar')
compile files('libs/open_sdk_r5756_lite.jar')
compile files('libs/TencentLocationSDK_v5.0.1_r251203_170116_1729.jar')
compile files('libs/wechat-sdk-android-without-mta-1.1.7.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/core-3.3.0.jar')
compile files('libs/okhttp-3.4.1.jar')
compile files('libs/okio-1.8.0.jar')
compile files('libs/pay2.4.0.1.jar')
compile files('libs/recyclerview.jar')
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\liuhaili\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# 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 *;
#}
package com.lemon.chess;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.lemon.chess", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lemon.chess">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- 一定要加上这句 -->
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<!-- QQ登录开始 -->
<activity
android:name="com.tencent.tauth.AuthActivity"
android:noHistory="true"
android:launchMode="singleTask" >
<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:scheme="1105877244" />
</intent-filter>
</activity>
<activity android:name="com.tencent.connect.common.AssistActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:configChanges="orientation|keyboardHidden|screenSize" />
<!-- QQ登录结束 -->
<activity
android:name=".wxapi.WXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".wxapi.WXPayEntryActivity"
android:exported="true"
android:launchMode="singleTop"/>
<activity
android:name="sdk.pay.PayWebViewActivity"
android:noHistory="true"
android:screenOrientation="portrait"/>
<meta-data android:name="TencentMapSDK" android:value="OGABZ-EFL24-64CUR-D6QF5-A6FZF-EXFOD" />
</application>
<service android:name="com.baidu.location.f" android:enabled="true" android:process=":remote"></service>
<uses-permission android:name="android.webkit.permission.PLUGIN"/>
<!-- 通过GPS得到精确位置 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- 通过网络得到粗略位置 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- 访问网络. 某些位置信息需要从网络服务器获取 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 访问WiFi状态. 需要WiFi信息用于网络定位 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 修改WiFi状态. 发起WiFi扫描, 需要WiFi信息用于网络定位 -->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<!-- 访问网络状态, 检测网络的可用性. 需要网络运营商相关信息用于网络定位 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- 访问网络的变化, 需要某些信息用于网络定位 -->
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<!-- 访问手机当前状态, 需要某些信息用于网络定位 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
\ No newline at end of file
package com.lemon.chess;
public interface HttpCallbackListener {
/**
* 服务器响应成功时调用,根据返回的内容在里面处理逻辑
* @param response
*/
void onFinish(String response);
/**
* 网络操作出现错误的时候调用,在里面对异常情况进行处理
* @param e
*/
void onError(Exception e);
}
package com.lemon.chess;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpUtil {
public static void sendHttpRequest(final String address , final HttpCallbackListener listener) {
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
HttpURLConnection connection = null;
try {
URL url = new URL(address);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setConnectTimeout(8000);
connection.setReadTimeout(8000);
connection.setDoInput(true);
connection.setDoOutput(true);
InputStream inputStream = connection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
StringBuilder response = new StringBuilder();
String line;
while((line = reader.readLine())!=null){
response.append(line);
}
if(listener != null){
//回调onFinish()方法
listener.onFinish(response.toString());
}
} catch(Exception e){
if(listener != null){
//回调onError()方法
listener.onError(e);
}
}finally {
if(connection != null){
connection.disconnect();
}
}
}
}).start();
}
}
\ No newline at end of file
package com.lemon.chess;
/**
* Created by liuhaili on 2017/5/7.
*/
public class LoginUserInfo {
public String Platform;
public String OpenID;
public String NickName;
public String IconUrl;
public String Longitude;
public String Latitude;
public String Address;
public String toString()
{
return Platform+"|"+OpenID+"|"+NickName+"|"+IconUrl+"|"+Longitude+"|"+Latitude+"|"+Address;
}
}
package com.lemon.chess;
import android.Manifest;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.os.Bundle;
import android.widget.Toast;
import android.content.Intent;
import com.lemon.chess.wxapi.WXEntryActivity;
import com.tencent.connect.UserInfo;
import com.tencent.connect.common.Constants;
import com.tencent.map.geolocation.TencentLocationManager;
import com.tencent.map.geolocation.TencentLocationRequest;
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX;
import com.tencent.mm.opensdk.modelmsg.WXImageObject;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import com.tencent.mm.opensdk.modelmsg.WXWebpageObject;
import com.tencent.mm.opensdk.modelpay.PayReq;
import com.tencent.tauth.IUiListener;
import com.tencent.tauth.Tencent;
import com.tencent.tauth.UiError;
import com.tencent.connect.share.QQShare;
import org.json.JSONException;
import org.json.JSONObject;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.unity3d.player.UnityPlayer;
import com.unity3d.player.UnityPlayerActivity;
import java.io.InputStream;
import java.util.Date;
import sdk.pay.PayUtil;
import sdk.pay.listener.PayGetPayStatusListener;
import sdk.pay.listener.PayUtilCallBack;
import sdk.pay.model.TokenParam;
import sdk.pay.utils.PayMD5Util;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import static com.tencent.map.geolocation.TencentLocationRequest.REQUEST_LEVEL_NAME;
public class MainActivity extends UnityPlayerActivity implements PayUtilCallBack{
public Tencent mTencent;
public TencentLocationManager mLocationManager;
public LoginUserInfo mLoginUserInfo=new LoginUserInfo();
public static MainActivity MyActivity=null;
private PayUtil mPayUtil;
public static final String SYSTEM_NAME = "jft";
public static final String CODE = "10220355";
public static final String APPID = "20170924153631363372";
public static final String COM_KEY = "6A4EEA817F400C8960AC75A5B6D802D6";
public static final String KEY = "214630dcf4edc5262eff2ee5d23fad18";
public static final String VECTOR = "5c537b91bc2451bd";
public static final String RETURN_URL = "http://";
public static final String NOTICE_URL = "http://www.kawumei.com/StoreService/PayNotice";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_main);
MyActivity=this;
mTencent = Tencent.createInstance("1106150450", this.getApplicationContext());
mPayUtil = new PayUtil(this, APPID, KEY, VECTOR, SYSTEM_NAME, this, true);
}
//重写Activity里的onActivityResult方法,这个方法和startActivityForResult是一对出现。
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (mTencent!=null) {
Tencent.onActivityResultData(requestCode, resultCode, intent, loginListener);
}
super.onActivityResult(requestCode, resultCode, intent);
}
/**
* 实现QQ第三方登录
*/
IUiListener loginListener = new IUiListener() {
@Override
public void onComplete(Object o) {
//登录成功后回调该方法,可以跳转相关的页面
Toast.makeText(MainActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
JSONObject object = (JSONObject) o;
try {
String accessToken = object.getString("access_token");
String expires = object.getString("expires_in");
String openID = object.getString("openid");
mTencent.setAccessToken(accessToken, expires);
mTencent.setOpenId(openID);
//UnityPlayer.UnitySendMessage("PlatformCallBackListener","onLogin",openID);
qqGetUserInfo();
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(UiError uiError) {}
@Override
public void onCancel() {}
};
public void qqLogin() {
mTencent.login(this, "all", loginListener);
}
public void qqShare(String title,String content,String url,String imgUrl,String appName){
if(imgUrl.startsWith("http:"))
{
Bundle bundle = new Bundle();
//这条分享消息被好友点击后的跳转URL。
bundle.putString(QQShare.SHARE_TO_QQ_TARGET_URL, url);
//分享的标题。注:PARAM_TITLE、PARAM_IMAGE_URL、PARAM_ SUMMARY不能全为空,最少必须有一个是有值的。
bundle.putString(QQShare.SHARE_TO_QQ_TITLE, title);
bundle.putString(QQShare.SHARE_TO_QQ_IMAGE_URL,imgUrl);
//分享的消息摘要,最长50个字
bundle.putString(QQShare.SHARE_TO_QQ_SUMMARY, content);
//手Q客户端顶部,替换“返回”按钮文字,如果为空,用返回代替
bundle.putString(QQShare.SHARE_TO_QQ_APP_NAME, "返回"+appName);
mTencent.shareToQQ(this, bundle , loginListener);
}
else
{
Bundle shareParams = new Bundle();
shareParams.putInt(QQShare.SHARE_TO_QQ_KEY_TYPE,QQShare.SHARE_TO_QQ_TYPE_IMAGE);
shareParams.putString(QQShare.SHARE_TO_QQ_IMAGE_LOCAL_URL,imgUrl);
shareParams.putString(QQShare.SHARE_TO_QQ_APP_NAME, "返回"+appName);
//shareParams.putInt(QQShare.SHARE_TO_QQ_EXT_INT,QQShare.SHARE_TO_QQ_FLAG_QZONE_ITEM_HIDE);
mTencent.shareToQQ(this, shareParams , loginListener);
}
}
private void qqGetUserInfo(){
UserInfo info = new UserInfo(this, mTencent.getQQToken());
info.getUserInfo(new IUiListener() {
@Override
public void onComplete(Object o) {
try {
JSONObject info = (JSONObject) o;
String nickName = info.getString("nickname");//获取用户昵称
String iconUrl = info.getString("figureurl_qq_2");//获取用户头像的url
//Toast.makeText(MainActivity.this,"昵称:"+nickName, Toast.LENGTH_SHORT).show();
//UnityPlayer.UnitySendMessage("PlatformCallBackListener","onGetUserInfo",mTencent.getAppId()+"|"+ nickName+"|"+iconUrl);
//Glide.with(MainActivity.this).load(iconUrl).transform(new GlideRoundTransform(MainActivity.this)).into(icon);//Glide解析获取用户头像
mLoginUserInfo.Platform="QQ";
mLoginUserInfo.OpenID=mTencent.getAppId();
mLoginUserInfo.NickName=nickName;
mLoginUserInfo.IconUrl=iconUrl;
txLocationBegin();
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(UiError uiError) {
}
@Override
public void onCancel() {
}
});
}
public void wxLogin(){
if(!WXEntryActivity.wxIsReady())
return;
SendAuth.Req req = new SendAuth.Req();
req.scope = "snsapi_userinfo";
req.state = "wechat_sdk_demo";
WXEntryActivity.WxApi.sendReq(req);
}
public void wxShare(String title,String content,String url,String imgUrl,String appName){
if(!WXEntryActivity.wxIsReady())
return;
if(imgUrl.startsWith("http:"))
{
WXWebpageObject wxWebpageObject=new WXWebpageObject();
wxWebpageObject.webpageUrl=url;
WXMediaMessage wxMediaMessage=new WXMediaMessage(wxWebpageObject);
wxMediaMessage.title=title;
wxMediaMessage.description=content;
try
{
InputStream isStream = new java.net.URL(imgUrl).openStream();
isStream.read(wxMediaMessage.thumbData);
}
catch (Exception ex)
{
ex.printStackTrace();
}
SendMessageToWX.Req req=new SendMessageToWX.Req();
req.transaction=String.valueOf(System.currentTimeMillis());
req.message=wxMediaMessage;
req.scene=SendMessageToWX.Req.WXSceneSession;
WXEntryActivity.WxApi.sendReq(req);
}
else
{
shareLocalPicture(imgUrl,SendMessageToWX.Req.WXSceneSession);
}
}
/*
* 分享图片
*/
private void shareLocalPicture(String imgUrl, int shareType) {
Bitmap bitmap = BitmapFactory.decodeFile(imgUrl, null);
WXImageObject imgObj = new WXImageObject(bitmap);
WXMediaMessage msg = new WXMediaMessage();
msg.mediaObject = imgObj;
Bitmap thumbBitmap = Bitmap.createScaledBitmap(bitmap, 150, 150, true);
bitmap.recycle();
msg.setThumbImage(thumbBitmap);
SendMessageToWX.Req req = new SendMessageToWX.Req();
req.transaction = String.valueOf(System.currentTimeMillis());
req.message = msg;
req.scene = shareType;
WXEntryActivity.WxApi.sendReq(req);
}
public void wxShareToTimeline(String title,String content,String url,String imgUrl,String appName){
if(!WXEntryActivity.wxIsReady())
return;
if(imgUrl.startsWith("http:"))
{
WXWebpageObject wxWebpageObject=new WXWebpageObject();
wxWebpageObject.webpageUrl=url;
WXMediaMessage wxMediaMessage=new WXMediaMessage(wxWebpageObject);
wxMediaMessage.title=title;
wxMediaMessage.description=content;
try
{
InputStream isStream = new java.net.URL(imgUrl).openStream();
isStream.read(wxMediaMessage.thumbData);
}
catch (Exception ex)
{
ex.printStackTrace();
}
SendMessageToWX.Req req=new SendMessageToWX.Req();
req.transaction=String.valueOf(System.currentTimeMillis());
req.message=wxMediaMessage;
req.scene=SendMessageToWX.Req.WXSceneTimeline;
WXEntryActivity.WxApi.sendReq(req);
}
else
{
shareLocalPicture(imgUrl,SendMessageToWX.Req.WXSceneTimeline);
}
}
public void txLocation(){
//权限检查,成功后调用定位
if (Build.VERSION.SDK_INT >= 23) {
String[] permissions = {
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.READ_PHONE_STATE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
};
if (checkSelfPermission(permissions[0]) != PackageManager.PERMISSION_GRANTED)
{
requestPermissions(permissions, 0);
}
}
}
public void txLocationBegin(){
TencentLocationRequest request = TencentLocationRequest.create();
request.setRequestLevel(REQUEST_LEVEL_NAME);
request.setAllowCache(true);
mLocationManager = TencentLocationManager.getInstance(getApplicationContext());
int error = mLocationManager.requestLocationUpdates(request, new MyLocationListener());
//Toast.makeText(MainActivity.MyActivity,"定位注册"+error, Toast.LENGTH_SHORT).show();
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
//可在此继续其他操作。
txLocationBegin();
}
public void wxPay(String partnerid,String prepayid,String noncestr,String timestamp,String packageValue,String sign){
if(!WXEntryActivity.wxIsReady())
return;
PayReq req = new PayReq();
req.appId = WXEntryActivity.WX_APP_ID;// 微信开放平台审核通过的应用APPID
req.partnerId = partnerid;// 微信支付分配的商户号
req.prepayId = prepayid;// 预支付订单号,app服务器调用“统一下单”接口获取
req.nonceStr = noncestr;// 随机字符串,不长于32位,服务器小哥会给咱生成
req.timeStamp = timestamp;// 时间戳,app服务器小哥给出
req.packageValue = packageValue;// 固定值Sign=WXPay,可以直接写死,服务器返回的也是这个固定值
req.sign = sign;// 签名,服务器小哥给出,他会根据:https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=4_3指导得到这个
WXEntryActivity.WxApi.sendReq(req);
Toast.makeText(MainActivity.this, "发起微信支付申请", Toast.LENGTH_SHORT).show();
}
public void jftPay(String uid,String goodsid,String price){
mPayUtil.getToken(getTokenParam(uid,goodsid,price), 3);
}
@Override
protected void onDestroy() {
if (null != mPayUtil) {
mPayUtil.destroy();
}
super.onDestroy();
}
@Override
protected void onResume() {
super.onResume();
mPayUtil.getPayStatus(new PayGetPayStatusListener() {
@Override
public void onPayStatus(int payStatus) {
if (payStatus == SUCCESS) {
//showToast(getString(R.string.pay_success));
} else {
//showToast(getString(R.string.pay_failure));
}
Toast.makeText(MainActivity.this, "微信支付成功", Toast.LENGTH_SHORT).show();
UnityPlayer.UnitySendMessage("PlatformCallBackListener","onPayComplated",payStatus+"");
}
});
}
public void onPayException(String exceptionmessage)
{
Toast.makeText(MainActivity.this, "微信支付失败"+exceptionmessage, Toast.LENGTH_SHORT).show();
}
private TokenParam getTokenParam(String uid,String goodsid,String price) {
Date date = new Date();
DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String CompKey = COM_KEY;
String p1_usercode = CODE;
String p2_order = dateFormat.format(date);
String p3_money = price;
String p4_returnurl = RETURN_URL; // user define
String p5_notifyurl = NOTICE_URL; // user define
String p6_ordertime = dateFormat.format(date);
String p7_sign = PayMD5Util.getMD5(
p1_usercode + "&" + p2_order + "&" + p3_money + "&"
+ p4_returnurl + "&" + p5_notifyurl + "&"
+ p6_ordertime + CompKey).toUpperCase();
TokenParam tokenParam = new TokenParam();
tokenParam.setP1_usercode(p1_usercode);
tokenParam.setP2_order(p2_order);
tokenParam.setP3_money(p3_money);
tokenParam.setP4_returnurl(p4_returnurl);
tokenParam.setP5_notifyurl(p5_notifyurl);
tokenParam.setP6_ordertime(p6_ordertime);
tokenParam.setP7_sign(p7_sign);
tokenParam.setP14_customname("kawumei");
tokenParam.setP24_remark(uid+"|"+goodsid);
return tokenParam;
}
}
package com.lemon.chess;
import android.app.Activity;
import android.widget.Toast;
import com.tencent.map.geolocation.TencentLocation;
import com.tencent.map.geolocation.TencentLocationListener;
import com.unity3d.player.UnityPlayer;
/**
* Created by liuhaili on 2017/5/4.
*/
public class MyLocationListener extends Activity implements TencentLocationListener {
@Override
public void onLocationChanged(TencentLocation location, int error, String reason) {
if (TencentLocation.ERROR_OK == error)
{
// 定位成功
Toast.makeText(MainActivity.MyActivity,location.getAddress()+" "+location.getLongitude()+" "+location.getLatitude(), Toast.LENGTH_SHORT).show();
MainActivity.MyActivity.mLoginUserInfo.Address=location.getAddress();
MainActivity.MyActivity.mLoginUserInfo.Longitude=location.getLongitude()+"";
MainActivity.MyActivity.mLoginUserInfo.Latitude=location.getLatitude()+"";
}
else
{
// 定位失败
Toast.makeText(MainActivity.MyActivity,"定位失败", Toast.LENGTH_SHORT).show();
}
UnityPlayer.UnitySendMessage("PlatformCallBackListener","onGetUserInfo",MainActivity.MyActivity.mLoginUserInfo.toString());
//定位完成后,无论成功或失败,都应当尽快删除之前注册的位置监听器
MainActivity.MyActivity.mLocationManager.removeUpdates(this);
}
@Override
public void onStatusUpdate(String name, int status, String desc) {
// do your work
}
}
\ No newline at end of file
package com.lemon.chess.wxapi;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.Toast;
import android.content.Intent;
import com.lemon.chess.HttpCallbackListener;
import com.lemon.chess.HttpUtil;
import com.lemon.chess.MainActivity;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.open.utils.HttpUtils;
import com.unity3d.player.UnityPlayer;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Timer;
import java.util.TimerTask;
/**
* Created by liuhaili on 2017/5/3.
*/
public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
private BaseResp resp = null;
// 获取第一步的code后,请求以下链接获取access_token
private String GetCodeRequest = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
// 获取用户个人信息
private String GetUserInfo = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID";
public static IWXAPI WxApi=null;
public static String WX_APP_ID="wx14055e74be2d4b6b";
public static String WX_APP_SECRET="b288392dbd1fd80a9fe9551d22872631";
private static String WXCode="";
private static String WXOpenID="";
public static WXEntryActivity MyWXEntryActivity=null;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MyWXEntryActivity=this;
if(wxIsReady())
{
WxApi.handleIntent(getIntent(), this);
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
WxApi.handleIntent(intent, this);
}
// 微信发送请求到第三方应用时,会回调到该方法
@Override
public void onReq(BaseReq req) {
finish();
}
@Override
public void onResp(BaseResp arg0) {
if (arg0.getType() == 2) {
finish();
}
if (arg0.getType() == 1) {
switch (arg0.errCode) {
// 同意授权
case BaseResp.ErrCode.ERR_OK:
SendAuth.Resp respLogin = (SendAuth.Resp) arg0;
// 获得code
WXCode = respLogin.code;
MainActivity.MyActivity.mLoginUserInfo.Platform="WX";
MainActivity.MyActivity.mLoginUserInfo.OpenID="testopenid";
MainActivity.MyActivity.mLoginUserInfo.NickName="haili333";
MainActivity.MyActivity.mLoginUserInfo.IconUrl=WXCode;
MainActivity.MyActivity.txLocationBegin();
finish();
break;
// 拒绝授权
case BaseResp.ErrCode.ERR_AUTH_DENIED:
finish();
break;
// 取消操作
case BaseResp.ErrCode.ERR_USER_CANCEL:
finish();
break;
default:
break;
}
}
}
private String getCodeRequestUrl(String code) {
String result = GetCodeRequest;
result = result.replace("APPID",urlEnodeUTF8(WX_APP_ID));
result = result.replace("SECRET",urlEnodeUTF8(WX_APP_SECRET));
result = result.replace("CODE", urlEnodeUTF8(code));
return result;
}
private String getUserInfoUrl(String access_token, String openid) {
String result = GetUserInfo;
result = result.replace("ACCESS_TOKEN",urlEnodeUTF8(access_token));
result = result.replace("OPENID", urlEnodeUTF8(openid));
return result;
}
private String urlEnodeUTF8(String str) {
String result = str;
try {
result = URLEncoder.encode(str, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
private void StartGetUserInfo(){
// 请求新的地址,解析相关数据,包括openid,acces_token等
String get_access_tokenUrl = getCodeRequestUrl(WXCode);
HttpUtil.sendHttpRequest(get_access_tokenUrl, new HttpCallbackListener() {
@Override
public void onFinish(String response)
{
try
{
// JSONObject jsonObject = new JSONObject(response);
// String access_token =jsonObject.getString("access_token");
// WXOpenID = jsonObject.getString("openid");
// String get_user_info_url = getUserInfoUrl(access_token, WXOpenID);
// // 请求新的unionid地址,解析出返回的unionid等数据
// HttpUtil.sendHttpRequest(get_user_info_url, new HttpCallbackListener(){
// @Override
// public void onFinish(String response){
// try
// {
// JSONObject getUserInfoJsonObject = new JSONObject(response);
// String nickname = getUserInfoJsonObject.getString("nickname");
// String headimgurl = getUserInfoJsonObject.getString("headimgurl");
//
// MainActivity.MyActivity.mLoginUserInfo.Platform="WX";
// MainActivity.MyActivity.mLoginUserInfo.OpenID=WXOpenID;
// MainActivity.MyActivity.mLoginUserInfo.NickName=nickname;
// MainActivity.MyActivity.mLoginUserInfo.IconUrl=headimgurl;
//
// MainActivity.MyActivity.txLocationBegin();
//
// MyWXEntryActivity.finish();
// }
// catch (Exception ex)
// {
// ex.printStackTrace();
//
// MyWXEntryActivity.finish();
// }
// }
// @Override
// public void onError(Exception e) {
// }
// });
}
catch (Exception e)
{
e.printStackTrace();
MyWXEntryActivity.finish();
}
}
@Override
public void onError(Exception e){
}
});
}
private void GetUserInfo(){
// try
// {
// Toast.makeText(MainActivity.MyActivity, "开始获取token和openid by code "+WXCode, Toast.LENGTH_LONG).show();
// String get_access_tokenUrl = getCodeRequestUrl(WXCode);
// Toast.makeText(MainActivity.MyActivity, "url:"+get_access_tokenUrl, Toast.LENGTH_LONG).show();
// String backstr= new HttpRequestor().doGet(get_access_tokenUrl);
// Toast.makeText(MainActivity.MyActivity, "结束获取token和openid", Toast.LENGTH_LONG).show();
// JSONObject jsonObject = new JSONObject(backstr);
// String access_token =jsonObject.getString("access_token");
// String openid = jsonObject.getString("openid");
// Toast.makeText(MainActivity.MyActivity, "开始获取用户信息", Toast.LENGTH_LONG).show();
// String get_user_info_url = getUserInfoUrl(access_token, openid);
//
// String getUserInfoBack= new HttpRequestor().doGet(get_user_info_url);
// JSONObject getUserInfoJsonObject = new JSONObject(getUserInfoBack);
// String nickname = getUserInfoJsonObject.getString("nickname");
// String headimgurl = getUserInfoJsonObject.getString("headimgurl");
// Toast.makeText(MainActivity.MyActivity, "结束获取用户信息", Toast.LENGTH_LONG).show();
// MainActivity.MyActivity.mLoginUserInfo.Platform="WX";
// MainActivity.MyActivity.mLoginUserInfo.OpenID=openid;
// MainActivity.MyActivity.mLoginUserInfo.NickName=nickname;
// MainActivity.MyActivity.mLoginUserInfo.IconUrl=headimgurl;
// Toast.makeText(this, "开始定位", Toast.LENGTH_LONG).show();
// MainActivity.MyActivity.txLocationBegin();
// }
// catch (Exception e)
// {
// e.printStackTrace();
// Toast.makeText(MainActivity.MyActivity, "出错了:"+e.getMessage(), Toast.LENGTH_LONG).show();
// }
}
public static boolean wxIsReady(){
if(WxApi==null)
{
Toast.makeText(MainActivity.MyActivity,"微信开始初始化", Toast.LENGTH_SHORT).show();
WxApi=WXAPIFactory.createWXAPI(MainActivity.MyActivity, WX_APP_ID, true);
WxApi.registerApp(WX_APP_ID);
Toast.makeText(MainActivity.MyActivity,"微信初始化完成", Toast.LENGTH_SHORT).show();
}
if(!WxApi.isWXAppInstalled())
{
Toast.makeText(MainActivity.MyActivity,"请先安装微信应用", Toast.LENGTH_SHORT).show();
return false;
}
// else if(!WxApi.isWXAppSupportAPI())
// {
// Toast.makeText(MainActivity.MyActivity,"微信版本太旧,请更新", Toast.LENGTH_SHORT).show();
// return false;
// }
return true;
}
}
package com.lemon.chess.wxapi;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import com.lemon.chess.MainActivity;
import com.lemon.chess.R;
import com.tencent.mm.opensdk.constants.ConstantsAPI;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
private static final String TAG = "MicroMsg.SDKSample.WXPayEntryActivity";
private IWXAPI api;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.pay_result);
if(WXEntryActivity.wxIsReady())
{
WXEntryActivity.WxApi.handleIntent(getIntent(), this);
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
api.handleIntent(intent, this);
}
@Override
public void onReq(BaseReq req) {
}
/**
* 得到支付结果回调
*/
@Override
public void onResp(BaseResp resp) {
Toast.makeText(MainActivity.MyActivity,"支付返回码"+String.valueOf(resp.errCode), Toast.LENGTH_SHORT).show();
if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.lemon.chess.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
\ No newline at end of file
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
<resources>
<string name="app_name">chess</string>
</resources>
<resources>
<!-- Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
- <style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">
- <!-- Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
- <!-- Application theme.
-->
- <style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here.
-->
</style>
</resources>
package com.lemon.chess;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
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
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# 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
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# 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
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" ] ; 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
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
@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
@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=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@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 Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_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=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
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
fileFormatVersion: 2
guid: b5d63e93852b66c45944a575604738cc
folderAsset: yes
timeCreated: 1476587045
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e0423eb9261120c41a2b0aed25860ec0
folderAsset: yes
timeCreated: 1478952545
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0875bbc55c80f9a4b9c3a12ec3fd6a80
timeCreated: 1478952545
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 37f2ffad98526f54ea22eabd0d026e4e
timeCreated: 1478952545
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f79329440b5bdb5468922bf56868a0bb
timeCreated: 1480659174
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0ea9a11fc98d37b41a6b0d51c8073f86
timeCreated: 1480659174
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ae0cf04df8e735a4098a3cd04b5411ce
timeCreated: 1480658742
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e9f10e61a20f1c2428e18a6a27ac9fd4
timeCreated: 1480658742
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6d2f882cb6fd2524c9294446a9368f3b
folderAsset: yes
timeCreated: 1476587057
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: de0d913a807ec9a429652db7aacc6d00
timeCreated: 1480775950
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 347b35cccdbc72846998e8f6bf1db27c
timeCreated: 1480151153
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f211b452c17a52a42b18453d8bd22ae2
timeCreated: 1478953033
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d4b1fb43f9ba6a840b2b1c79f3746ba8
timeCreated: 1481381987
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: bb6a107c95bd3d74bb2f3209d0da522e
timeCreated: 1481424348
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: fefa4b780be91a947963030ec624b9a8
timeCreated: 1477294263
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 37ae8bddfa926ff46a79cfa762b00ea2
timeCreated: 1481074320
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e5bc2204f590bf2478fd578541d578fa
timeCreated: 1474681882
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: bdbcb9e6033b78748b3a6fb98f4a7e42
timeCreated: 1481078839
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c862bf3a32f59a14591173880dc7c804
timeCreated: 1481466568
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c5305a0d16152fa459269831c36edfd1
timeCreated: 1480752948
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ef41da0252f7cfc4784c18296ae26cf4
timeCreated: 1480752263
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4419b2b9e3bbf0e4fab0167e80de8440
timeCreated: 1475326881
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: db743418e1c0be84e9e252aafc38ea88
timeCreated: 1480949284
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3411ceb62994b9a42be90adc970cf67e
timeCreated: 1480942133
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 450eb4ff50991a345910395c56d3315a
timeCreated: 1481074341
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册