Commit 196713fe authored by mengcuiguang2's avatar mengcuiguang2

优化网络架构

parent 5ece9c32
...@@ -135,7 +135,6 @@ android { ...@@ -135,7 +135,6 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation rootProject.ext.support["junit"] testImplementation rootProject.ext.support["junit"]
//下拉刷新 //下拉刷新
......
...@@ -2,25 +2,18 @@ package com.mints.street; ...@@ -2,25 +2,18 @@ package com.mints.street;
import android.content.Context; import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/** /**
* Instrumented test, which will execute on an Android device. * Instrumented test, which will execute on an Android device.
* *
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/ */
@RunWith(AndroidJUnit4.class) //@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest { //public class ExampleInstrumentedTest {
@Test // @Test
public void useAppContext() { // public void useAppContext() {
// Context of the app under test. // // Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); // Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.mints.goodnews", appContext.getPackageName()); // assertEquals("com.mints.goodnews", appContext.getPackageName());
} // }
} //}
\ No newline at end of file \ No newline at end of file
package com.mints.street.main package com.mints.street.main
import android.media.AudioManager
import android.os.Bundle import android.os.Bundle
import android.view.KeyEvent
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
...@@ -16,7 +18,9 @@ import com.mints.street.databinding.ActivityMainBinding ...@@ -16,7 +18,9 @@ import com.mints.street.databinding.ActivityMainBinding
import com.mints.street.main.vr.VRFragment import com.mints.street.main.vr.VRFragment
import com.mints.street.main.my.MyFragment import com.mints.street.main.my.MyFragment
import com.mints.street.main.home.HomeFragment import com.mints.street.main.home.HomeFragment
import com.mints.street.manager.UmengManager
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.ToastUtils
class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() { class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
...@@ -52,8 +56,26 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() { ...@@ -52,8 +56,26 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
) )
// test
UmengManager.initUm()
} }
var oldTime: Long = 0
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
when (keyCode) {
KeyEvent.KEYCODE_BACK -> {
// 设置为后台
val currentTime = System.currentTimeMillis()
if (currentTime - oldTime < 2 * 1000) {
AppManager.getAppManager().finishAllActivity()
} else {
ToastUtils.showLong("再次点击退出" + getString(R.string.app_name))
oldTime = currentTime
}
}
}
return true
}
} }
......
package com.mints.street.model package com.mints.street.model
import com.fry.base.netwrok.HttpManager
import com.mints.street.api.MainApi import com.mints.street.api.MainApi
import com.mints.street.bean.AwardBean import com.mints.street.bean.AwardBean
import com.mints.street.bean.UserBean import com.mints.street.bean.UserBean
import com.mints.street.netwrok.HttpManager
import com.trello.rxlifecycle2.LifecycleProvider import com.trello.rxlifecycle2.LifecycleProvider
import io.reactivex.Observable import io.reactivex.Observable
import me.goldze.mvvmhabit.http.BaseResponse import me.goldze.mvvmhabit.http.BaseResponse
......
...@@ -7,7 +7,7 @@ import com.fry.base.basenetwork.IHttpResponseListener; ...@@ -7,7 +7,7 @@ import com.fry.base.basenetwork.IHttpResponseListener;
import com.fry.base.basenetwork.RetrofitClient; import com.fry.base.basenetwork.RetrofitClient;
import com.fry.base.global.Constants; import com.fry.base.global.Constants;
import com.fry.base.netwrok.OkHttpInterceptor; import com.fry.base.netwrok.OkHttpInterceptor;
import com.fry.base.utils.encry.AESUtils; import com.mints.street.utils.encry.AESUtils;
import com.trello.rxlifecycle2.LifecycleProvider; import com.trello.rxlifecycle2.LifecycleProvider;
import io.reactivex.Observable; import io.reactivex.Observable;
......
...@@ -4,13 +4,14 @@ import android.text.TextUtils ...@@ -4,13 +4,14 @@ import android.text.TextUtils
import android.util.Log import android.util.Log
import com.bytedance.hume.readapk.HumeSDK import com.bytedance.hume.readapk.HumeSDK
import com.fry.base.bean.AppRequest import com.fry.base.bean.AppRequest
import com.fry.base.utils.encry.AESUtils
import com.fry.base.utils.encry.Base64
import com.fry.base.utils.encry.MD5
import com.google.gson.Gson import com.google.gson.Gson
import com.mints.street.AppApplication import com.mints.street.AppApplication
import com.mints.street.BuildConfig
import com.mints.street.manager.UserManager import com.mints.street.manager.UserManager
import com.mints.street.utils.CommonUtils import com.mints.street.utils.CommonUtils
import com.mints.street.utils.encry.AESUtils
import com.mints.street.utils.encry.Base64
import com.mints.street.utils.encry.MD5
import okhttp3.* import okhttp3.*
import okio.Buffer import okio.Buffer
import org.json.JSONObject import org.json.JSONObject
......
...@@ -129,9 +129,7 @@ class SplashActivity:BaseActivity<ActivitySplashBinding,SplashViewModel>() { ...@@ -129,9 +129,7 @@ class SplashActivity:BaseActivity<ActivitySplashBinding,SplashViewModel>() {
} }
override fun onSplashAdLoadSuccess() { override fun onSplashAdLoadSuccess() {
if (mTTSplashAd != null) { mTTSplashAd?.showAd(mSplashContainer)
mTTSplashAd!!.showAd(mSplashContainer)
}
} }
override fun onAdLoadTimeout() { override fun onAdLoadTimeout() {
......
package com.fry.base.utils.encry; package com.mints.street.utils.encry;
import android.util.Log;
import com.fry.base.BuildConfig; import com.fry.base.BuildConfig;
...@@ -12,6 +10,7 @@ import javax.crypto.spec.SecretKeySpec; ...@@ -12,6 +10,7 @@ import javax.crypto.spec.SecretKeySpec;
import Decoder.BASE64Decoder; import Decoder.BASE64Decoder;
import Decoder.BASE64Encoder; import Decoder.BASE64Encoder;
public class AESUtils { public class AESUtils {
private static final String vis = MD5.GetMD5Code("street_2021").substring(8, 24); private static final String vis = MD5.GetMD5Code("street_2021").substring(8, 24);
......
package com.fry.base.utils.encry; package com.mints.street.utils.encry;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
/** /**
* Base64编码工具类 * Base64编码工具类
* *
* @author * @author
* @date 2012-10-11 * @date 2012-10-11
*/ */
public class Base64 { public class Base64 {
private static final char[] legalChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray(); private static final char[] legalChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
public static String encode(byte[] data) { public static String encode(byte[] data) {
int start = 0; int start = 0;
int len = data.length; int len = data.length;
StringBuffer buf = new StringBuffer(data.length * 3 / 2); StringBuffer buf = new StringBuffer(data.length * 3 / 2);
int end = len - 3; int end = len - 3;
int i = start; int i = start;
int n = 0; int n = 0;
while (i <= end) { while (i <= end) {
int d = ((((int) data[i]) & 0x0ff) << 16) | ((((int) data[i + 1]) & 0x0ff) << 8) | (((int) data[i + 2]) & 0x0ff); int d = ((((int) data[i]) & 0x0ff) << 16) | ((((int) data[i + 1]) & 0x0ff) << 8) | (((int) data[i + 2]) & 0x0ff);
buf.append(legalChars[(d >> 18) & 63]); buf.append(legalChars[(d >> 18) & 63]);
buf.append(legalChars[(d >> 12) & 63]); buf.append(legalChars[(d >> 12) & 63]);
buf.append(legalChars[(d >> 6) & 63]); buf.append(legalChars[(d >> 6) & 63]);
buf.append(legalChars[d & 63]); buf.append(legalChars[d & 63]);
i += 3; i += 3;
if (n++ >= 14) { if (n++ >= 14) {
n = 0; n = 0;
buf.append(" "); buf.append(" ");
} }
} }
if (i == start + len - 2) { if (i == start + len - 2) {
int d = ((((int) data[i]) & 0x0ff) << 16) | ((((int) data[i + 1]) & 255) << 8); int d = ((((int) data[i]) & 0x0ff) << 16) | ((((int) data[i + 1]) & 255) << 8);
buf.append(legalChars[(d >> 18) & 63]); buf.append(legalChars[(d >> 18) & 63]);
buf.append(legalChars[(d >> 12) & 63]); buf.append(legalChars[(d >> 12) & 63]);
buf.append(legalChars[(d >> 6) & 63]); buf.append(legalChars[(d >> 6) & 63]);
buf.append("="); buf.append("=");
} else if (i == start + len - 1) { } else if (i == start + len - 1) {
int d = (((int) data[i]) & 0x0ff) << 16; int d = (((int) data[i]) & 0x0ff) << 16;
buf.append(legalChars[(d >> 18) & 63]); buf.append(legalChars[(d >> 18) & 63]);
buf.append(legalChars[(d >> 12) & 63]); buf.append(legalChars[(d >> 12) & 63]);
buf.append("=="); buf.append("==");
} }
return buf.toString(); return buf.toString();
} }
private static int decode(char c) { private static int decode(char c) {
if (c >= 'A' && c <= 'Z') if (c >= 'A' && c <= 'Z')
return ((int) c) - 65; return ((int) c) - 65;
else if (c >= 'a' && c <= 'z') else if (c >= 'a' && c <= 'z')
return ((int) c) - 97 + 26; return ((int) c) - 97 + 26;
else if (c >= '0' && c <= '9') else if (c >= '0' && c <= '9')
return ((int) c) - 48 + 26 + 26; return ((int) c) - 48 + 26 + 26;
else else
switch (c) { switch (c) {
case '+': case '+':
return 62; return 62;
case '/': case '/':
return 63; return 63;
case '=': case '=':
return 0; return 0;
default: default:
throw new RuntimeException("unexpected code: " + c); throw new RuntimeException("unexpected code: " + c);
} }
} }
/** /**
* Decodes the given Base64 encoded String to a new byte array. The byte array holding the decoded data is returned. * Decodes the given Base64 encoded String to a new byte array. The byte array holding the decoded data is returned.
*/ */
public static byte[] decode(String s) { public static byte[] decode(String s) {
ByteArrayOutputStream bos = new ByteArrayOutputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream();
try { try {
decode(s, bos); decode(s, bos);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(); throw new RuntimeException();
} }
byte[] decodedBytes = bos.toByteArray(); byte[] decodedBytes = bos.toByteArray();
try { try {
bos.close(); bos.close();
bos = null; bos = null;
} catch (IOException ex) { } catch (IOException ex) {
System.err.println("Error while decoding BASE64: " + ex.toString()); System.err.println("Error while decoding BASE64: " + ex.toString());
} }
return decodedBytes; return decodedBytes;
} }
private static void decode(String s, OutputStream os) throws IOException { private static void decode(String s, OutputStream os) throws IOException {
int i = 0; int i = 0;
int len = s.length(); int len = s.length();
while (true) { while (true) {
while (i < len && s.charAt(i) <= ' ') while (i < len && s.charAt(i) <= ' ')
i++; i++;
if (i == len) if (i == len)
break; break;
int tri = (decode(s.charAt(i)) << 18) + (decode(s.charAt(i + 1)) << 12) + (decode(s.charAt(i + 2)) << 6) + (decode(s.charAt(i + 3))); int tri = (decode(s.charAt(i)) << 18) + (decode(s.charAt(i + 1)) << 12) + (decode(s.charAt(i + 2)) << 6) + (decode(s.charAt(i + 3)));
os.write((tri >> 16) & 255); os.write((tri >> 16) & 255);
if (s.charAt(i + 2) == '=') if (s.charAt(i + 2) == '=')
break; break;
os.write((tri >> 8) & 255); os.write((tri >> 8) & 255);
if (s.charAt(i + 3) == '=') if (s.charAt(i + 3) == '=')
break; break;
os.write(tri & 255); os.write(tri & 255);
i += 4; i += 4;
} }
} }
} }
package com.fry.base.utils.encry; package com.mints.street.utils.encry;
import android.util.Log; import android.util.Log;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.security.Key; import java.security.Key;
import javax.crypto.Cipher; import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory; import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec; import javax.crypto.spec.DESedeKeySpec;
import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.IvParameterSpec;
/** /**
* 描述:3DES加密工具类 * 描述:3DES加密工具类
* 作者:孟崔广 * 作者:孟崔广
* 时间:2018/3/29 17:51 * 时间:2018/3/29 17:51
* 邮箱:mengcga@163.com * 邮箱:mengcga@163.com
*/ */
public class Des3 { public class Des3 {
// crediteasec@lx100$#365#$ // crediteasec@lx100$#365#$
// 密钥 // 密钥
// private final static String secretKey = "mail.asiainfo.com@2x222$#bbb#2"; // private final static String secretKey = "mail.asiainfo.com@2x222$#bbb#2";
// 向量 // 向量
private final static String iv = "01234567"; private final static String iv = "01234567";
// 加解密统一使用的编码方式 // 加解密统一使用的编码方式
private final static String encoding = "utf-8"; private final static String encoding = "utf-8";
private static String TAG = "Des3"; private static String TAG = "Des3";
/** /**
* 3DES加密 * 3DES加密
* *
* @param plainText 普通文本 * @param plainText 普通文本
* @return * @return
* @throws Exception * @throws Exception
*/ */
public static String encode(String plainText, String secretKey) { public static String encode(String plainText, String secretKey) {
String ciphertext = ""; String ciphertext = "";
if (plainText != null && plainText.length() != 0) { if (plainText != null && plainText.length() != 0) {
Key deskey = null; Key deskey = null;
byte[] encryptData = null; byte[] encryptData = null;
try { try {
byte[] bytes = secretKey.getBytes(); byte[] bytes = secretKey.getBytes();
DESedeKeySpec spec = new DESedeKeySpec(bytes); DESedeKeySpec spec = new DESedeKeySpec(bytes);
SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede"); SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
deskey = keyfactory.generateSecret(spec); deskey = keyfactory.generateSecret(spec);
Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding"); Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding");
IvParameterSpec ips = new IvParameterSpec(iv.getBytes()); IvParameterSpec ips = new IvParameterSpec(iv.getBytes());
cipher.init(Cipher.ENCRYPT_MODE, deskey, ips); cipher.init(Cipher.ENCRYPT_MODE, deskey, ips);
encryptData = cipher.doFinal(plainText.getBytes(encoding)); encryptData = cipher.doFinal(plainText.getBytes(encoding));
ciphertext = Base64.encode(encryptData); ciphertext = Base64.encode(encryptData);
//这里需要对特殊字符串进行转码 //这里需要对特殊字符串进行转码
ciphertext = URLEncoder.encode(ciphertext, "utf-8"); ciphertext = URLEncoder.encode(ciphertext, "utf-8");
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, e.getMessage().toString()); Log.e(TAG, e.getMessage().toString());
e.printStackTrace(); e.printStackTrace();
} }
} }
return ciphertext; return ciphertext;
} }
/** /**
* 3DES解密 * 3DES解密
* *
* @param encryptText 加密文本 * @param encryptText 加密文本
* @return * @return
* @throws Exception * @throws Exception
*/ */
public static String decode(String encryptText, String secretKey) { public static String decode(String encryptText, String secretKey) {
String clearText = ""; String clearText = "";
if (encryptText != null && encryptText.length() != 0) { if (encryptText != null && encryptText.length() != 0) {
Key deskey = null; Key deskey = null;
byte[] decryptData; byte[] decryptData;
try { try {
//这里需要对特殊字符串进行转码 //这里需要对特殊字符串进行转码
encryptText = URLDecoder.decode( encryptText = URLDecoder.decode(
encryptText, "utf-8"); encryptText, "utf-8");
DESedeKeySpec spec = new DESedeKeySpec(secretKey.getBytes()); DESedeKeySpec spec = new DESedeKeySpec(secretKey.getBytes());
SecretKeyFactory keyfactory = SecretKeyFactory SecretKeyFactory keyfactory = SecretKeyFactory
.getInstance("desede"); .getInstance("desede");
deskey = keyfactory.generateSecret(spec); deskey = keyfactory.generateSecret(spec);
Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding"); Cipher cipher = Cipher.getInstance("desede/CBC/PKCS5Padding");
IvParameterSpec ips = new IvParameterSpec(iv.getBytes()); IvParameterSpec ips = new IvParameterSpec(iv.getBytes());
cipher.init(Cipher.DECRYPT_MODE, deskey, ips); cipher.init(Cipher.DECRYPT_MODE, deskey, ips);
decryptData = cipher.doFinal(Base64.decode(encryptText)); decryptData = cipher.doFinal(Base64.decode(encryptText));
clearText = new String(decryptData, encoding); clearText = new String(decryptData, encoding);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
return clearText; return clearText;
} }
} }
package com.fry.base.utils.encry; package com.mints.street.utils.encry;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
/* /*
* MD5 算法 * MD5 算法
*/ */
public class MD5 { public class MD5 {
// 全局数组 // 全局数组
private final static String[] strDigits = { "0", "1", "2", "3", "4", "5", private final static String[] strDigits = { "0", "1", "2", "3", "4", "5",
"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
// 返回形式为数字跟字符串 // 返回形式为数字跟字符串
private static String byteToArrayString(byte bByte) { private static String byteToArrayString(byte bByte) {
int iRet = bByte; int iRet = bByte;
// System.out.println("iRet="+iRet); // System.out.println("iRet="+iRet);
if (iRet < 0) { if (iRet < 0) {
iRet += 256; iRet += 256;
} }
int iD1 = iRet / 16; int iD1 = iRet / 16;
int iD2 = iRet % 16; int iD2 = iRet % 16;
return strDigits[iD1] + strDigits[iD2]; return strDigits[iD1] + strDigits[iD2];
} }
// 返回形式只为数字 // 返回形式只为数字
private static String byteToNum(byte bByte) { private static String byteToNum(byte bByte) {
int iRet = bByte; int iRet = bByte;
System.out.println("iRet1=" + iRet); System.out.println("iRet1=" + iRet);
if (iRet < 0) { if (iRet < 0) {
iRet += 256; iRet += 256;
} }
return String.valueOf(iRet); return String.valueOf(iRet);
} }
// 转换字节数组为16进制字串 // 转换字节数组为16进制字串
private static String byteToString(byte[] bByte) { private static String byteToString(byte[] bByte) {
StringBuffer sBuffer = new StringBuffer(); StringBuffer sBuffer = new StringBuffer();
for (int i = 0; i < bByte.length; i++) { for (int i = 0; i < bByte.length; i++) {
sBuffer.append(byteToArrayString(bByte[i])); sBuffer.append(byteToArrayString(bByte[i]));
} }
return sBuffer.toString(); return sBuffer.toString();
} }
public static String GetMD5Code(String strObj) { public static String GetMD5Code(String strObj) {
String resultString = null; String resultString = null;
try { try {
resultString = new String(strObj); resultString = new String(strObj);
MessageDigest md = MessageDigest.getInstance("MD5"); MessageDigest md = MessageDigest.getInstance("MD5");
// md.digest() 该函数返回值为存放哈希值结果的byte数组 // md.digest() 该函数返回值为存放哈希值结果的byte数组
resultString = byteToString(md.digest(strObj.getBytes())); resultString = byteToString(md.digest(strObj.getBytes()));
} catch (NoSuchAlgorithmException ex) { } catch (NoSuchAlgorithmException ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
return resultString; return resultString;
} }
public static void main(String[] args) { public static void main(String[] args) {
MD5 getMD5 = new MD5(); MD5 getMD5 = new MD5();
System.out.println(GetMD5Code("136111111111231231231231e807f1fcf82d132f9bb018ca6738a19f")); System.out.println(GetMD5Code("136111111111231231231231e807f1fcf82d132f9bb018ca6738a19f"));
} }
} }
\ No newline at end of file
...@@ -33,4 +33,4 @@ RELEASE_SHARESDK_KEY= ...@@ -33,4 +33,4 @@ RELEASE_SHARESDK_KEY=
RELEASE_SHARESDK_SECRET= RELEASE_SHARESDK_SECRET=
#友盟 #友盟
RELEASE_UMENG_KEY= RELEASE_UMENG_KEY=60e80209a6f90557b7b19aa7
\ No newline at end of file
...@@ -44,7 +44,7 @@ dependencies { ...@@ -44,7 +44,7 @@ dependencies {
api project(':mvvmhabit') api project(':mvvmhabit')
//阿里路由框架 //阿里路由框架
api rootProject.ext.dependencies["arouter-api"] // api rootProject.ext.dependencies["arouter-api"]
//指示器 //指示器
api rootProject.ext.dependencies["hackware1993"] api rootProject.ext.dependencies["hackware1993"]
......
...@@ -3,8 +3,6 @@ package com.fry.base.base; ...@@ -3,8 +3,6 @@ package com.fry.base.base;
import android.app.Application; import android.app.Application;
import android.view.Gravity; import android.view.Gravity;
import com.alibaba.android.arouter.launcher.ARouter;
import me.goldze.mvvmhabit.utils.KLog; import me.goldze.mvvmhabit.utils.KLog;
import me.goldze.mvvmhabit.utils.ToastUtils; import me.goldze.mvvmhabit.utils.ToastUtils;
import com.fry.base.BuildConfig; import com.fry.base.BuildConfig;
...@@ -22,10 +20,10 @@ public class BaseModuleInit implements IModuleInit<Void> { ...@@ -22,10 +20,10 @@ public class BaseModuleInit implements IModuleInit<Void> {
//开启打印日志 //开启打印日志
KLog.init(BuildConfig.DEBUG); KLog.init(BuildConfig.DEBUG);
//初始化阿里路由框架 //初始化阿里路由框架
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
ARouter.openLog(); // 打印日志 // ARouter.openLog(); // 打印日志
ARouter.openDebug(); // 开启调试模式(如果在InstantRun模式下运行,必须开启调试模式!线上版本需要关闭,否则有安全风险) // ARouter.openDebug(); // 开启调试模式(如果在InstantRun模式下运行,必须开启调试模式!线上版本需要关闭,否则有安全风险)
} // }
// 尽可能早,推荐在Application中初始化 // 尽可能早,推荐在Application中初始化
// ARouter.init(application); // ARouter.init(application);
ToastUtils.setGravity(Gravity.CENTER,0,0); ToastUtils.setGravity(Gravity.CENTER,0,0);
......
...@@ -6,8 +6,6 @@ import android.text.TextUtils; ...@@ -6,8 +6,6 @@ import android.text.TextUtils;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.fry.base.BuildConfig; import com.fry.base.BuildConfig;
import com.fry.base.netwrok.OkHttpInterceptor;
import com.fry.base.utils.encry.AESUtils;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -34,7 +32,7 @@ import retrofit2.converter.gson.GsonConverterFactory; ...@@ -34,7 +32,7 @@ import retrofit2.converter.gson.GsonConverterFactory;
*/ */
public class RetrofitClient { public class RetrofitClient {
private HttpConfiguation mHttpConfig; public HttpConfiguation mHttpConfig;
private Context mContext = Utils.getContext(); private Context mContext = Utils.getContext();
......
...@@ -16,22 +16,6 @@ public class Constants { ...@@ -16,22 +16,6 @@ public class Constants {
/*** /***
* bugly配置信息 * bugly配置信息
*/ */
public static final String BUGLY_APP_ID = "1aa21b8cc3";
public static final String UMENG_APP_KEY = "58c35e724544cb4fa8001acf";
public static final String JPUSH_KEY = "830808eb0ee65458c952891c";
public static final String WX_APP_ID = "wxff15efaf15adc6f8";
public static final String WX_APP_SECRET = "83d6dbe46f84bde4cf78d0b58764d797";
public static final String QQAppID = "1105708819";
public static final String QQAppKey = "J9olD7s7udx8rJ0E";
public static final String SinaAppKey = "824068500";
public static final String SinaAppSecret = "99dd08e9f7de660cb81ddc8f90e67e7c";
public static final String SinaCallBackURL = "http://sns.whalecloud.com/sina2/callback";
public static final String BUNDLE_ID = "bundleId";
public static final String ID = "id"; public static final String ID = "id";
/** /**
......
package com.fry.base.provider
import android.content.Context
import com.alibaba.android.arouter.facade.template.IProvider
import com.alibaba.android.arouter.launcher.ARouter
/**
* Description :
* Created by yue on 2021/3/10
*/
interface IFlutterProvider : IProvider {
companion object {
const val PROVIDER: String = "/flutter/provider"
@JvmStatic
fun getInstance(): IFlutterProvider {
return ARouter.getInstance().build(PROVIDER).navigation() as IFlutterProvider
}
}
fun toFlutter(context: Context, path: String, arguments: HashMap<String, Any>? = null, requestCode: Int = 0)
}
\ No newline at end of file
#Fri Jul 09 14:29:26 CST 2021 #Fri Jul 09 16:57:51 CST 2021
VERSION_BUILD=2633 VERSION_BUILD=2659
#Fri Jul 09 11:54:15 CST 2021 #Fri Jul 09 15:21:04 CST 2021
D\:\\android_space\\MyStreet\\shareSdkLib\\src\\main\\res\\drawable-xhdpi\\ssdk_auth_title_back.png=D\:\\android_space\\MyStreet\\shareSdkLib\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\ssdk_auth_title_back.png D\:\\android_space\\MyStreet\\shareSdkLib\\src\\main\\res\\drawable-xhdpi\\ssdk_auth_title_back.png=D\:\\android_space\\MyStreet\\shareSdkLib\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\ssdk_auth_title_back.png
D\:\\android_space\\MyStreet\\shareSdkLib\\src\\main\\res\\drawable-xhdpi\\ssdk_oks_classic_yixin.png=D\:\\android_space\\MyStreet\\shareSdkLib\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\ssdk_oks_classic_yixin.png D\:\\android_space\\MyStreet\\shareSdkLib\\src\\main\\res\\drawable-xhdpi\\ssdk_oks_classic_yixin.png=D\:\\android_space\\MyStreet\\shareSdkLib\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\ssdk_oks_classic_yixin.png
D\:\\android_space\\MyStreet\\shareSdkLib\\src\\main\\res\\drawable-xhdpi\\ssdk_oks_classic_wechatfavorite.png=D\:\\android_space\\MyStreet\\shareSdkLib\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\ssdk_oks_classic_wechatfavorite.png D\:\\android_space\\MyStreet\\shareSdkLib\\src\\main\\res\\drawable-xhdpi\\ssdk_oks_classic_wechatfavorite.png=D\:\\android_space\\MyStreet\\shareSdkLib\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\ssdk_oks_classic_wechatfavorite.png
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment