Compare commits
12 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
2d9bbf6fa5 | |
|
|
892c2f68f0 | |
|
|
fbcc8ad36c | |
|
|
11eb1c7858 | |
|
|
3828a2cc20 | |
|
|
a89f1d68da | |
|
|
0541a93301 | |
|
|
19107568eb | |
|
|
9fd895dbb2 | |
|
|
239fb06ed8 | |
|
|
c0d5b628f9 | |
|
|
e53e0496d6 |
|
|
@ -26,5 +26,6 @@ android.enableJetifier=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.useDeprecatedNdk=true
|
android.useDeprecatedNdk=true
|
||||||
|
|
||||||
|
|
||||||
versionCode=104
|
versionCode=104
|
||||||
versionName=4.12.04
|
versionName=4.12.04
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
package com.ifish.activity;
|
package com.ifish.activity;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
@ -20,7 +19,6 @@ import android.net.wifi.ScanResult;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
|
@ -45,7 +43,6 @@ import com.ifish.utils.HttpManager;
|
||||||
import com.ifish.utils.SPUtil;
|
import com.ifish.utils.SPUtil;
|
||||||
import com.ifish.utils.ToastUtil;
|
import com.ifish.utils.ToastUtil;
|
||||||
import com.ifish.utils.WifiAdmin;
|
import com.ifish.utils.WifiAdmin;
|
||||||
import com.ifish.utils.WifiUtil;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public class HotSpotConnentSetWIFIActivity extends BaseActivity {
|
||||||
// doPostBindDevice();
|
// doPostBindDevice();
|
||||||
isjump = true;
|
isjump = true;
|
||||||
Intent i = new Intent();
|
Intent i = new Intent();
|
||||||
|
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
i = new Intent(Settings.ACTION_WIFI_SETTINGS);
|
i = new Intent(Settings.ACTION_WIFI_SETTINGS);
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
package com.ifish.basebean;
|
package com.ifish.basebean;
|
||||||
|
|
||||||
|
import com.ifish.utils.Commons;
|
||||||
|
import com.lidroid.xutils.util.LogUtils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -46,6 +50,25 @@ public class User implements Serializable{
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte[] getUserIdBytes(){
|
||||||
|
String originalUserId = Commons.USER.getUserId();
|
||||||
|
|
||||||
|
// 创建一个长度为10的字节数组,用于存储补零后的用户ID
|
||||||
|
byte[] userIdBytes = new byte[10];
|
||||||
|
|
||||||
|
// 将原始用户ID的字节数组复制到新的字节数组中
|
||||||
|
byte[] originalBytes = originalUserId.getBytes();
|
||||||
|
System.arraycopy(originalBytes, 0, userIdBytes, 0, Math.min(originalBytes.length, userIdBytes.length));
|
||||||
|
|
||||||
|
// 如果原始用户ID的长度小于10,用零填充剩余的空间
|
||||||
|
for (int i = originalBytes.length; i < userIdBytes.length; i++) {
|
||||||
|
userIdBytes[i] = 0;
|
||||||
|
}
|
||||||
|
LogUtils.d("LHD 传递userId = "+ Arrays.toString(userIdBytes));
|
||||||
|
return userIdBytes;
|
||||||
|
}
|
||||||
|
|
||||||
public String getToken() {
|
public String getToken() {
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,8 @@ public class BaseApplication extends MultiDexApplication {
|
||||||
/**
|
/**
|
||||||
* 正式环境
|
* 正式环境
|
||||||
*/
|
*/
|
||||||
public static String BASE = "https://app.ifish7.cn/";//正式环境 接口访问地址
|
// public static String BASE = "https://app.ifish7.cn/";//正式环境 接口访问地址
|
||||||
// public static String BASE = "http://139.196.24.156:7080/";//测试环境 接口访问地址
|
public static String BASE = "http://139.196.24.156:7080/";//测试环境 接口访问地址
|
||||||
public static String BASE_URL = BASE + "api/";// 接口URL
|
public static String BASE_URL = BASE + "api/";// 接口URL
|
||||||
public static final String SERVICE_UUID = "000000ff-0000-1000-8000-00805f9b34fb";
|
public static final String SERVICE_UUID = "000000ff-0000-1000-8000-00805f9b34fb";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ package com.ifish.fragment;
|
||||||
|
|
||||||
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
|
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
|
|
@ -52,7 +51,6 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
//jjia-push
|
//jjia-push
|
||||||
//import com.clj.fastble.BleManager;
|
//import com.clj.fastble.BleManager;
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
//package com.ifish.push;
|
|
||||||
//
|
|
||||||
//import android.content.Context;
|
|
||||||
//import android.content.Intent;
|
|
||||||
//import android.util.Log;
|
|
||||||
//
|
|
||||||
//import com.ifish.activity.RecentContactsActivity;
|
|
||||||
//
|
|
||||||
//import java.util.Map;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * Created by Administrator on 2019/5/22.
|
|
||||||
// */
|
|
||||||
//
|
|
||||||
//public class AlipushReceiver extends MessageReceiver {
|
|
||||||
// // 消息接收部分的LOG_TAG
|
|
||||||
// public static final String REC_TAG = "receiver";
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onNotification(Context context, String title, String summary, Map<String, String> extraMap) {
|
|
||||||
// // TODO 处理推送通知
|
|
||||||
// Log.e("MyMessageReceiver", "Receive notification, title: " + title + ", summary: " + summary + ", extraMap: " + extraMap);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onMessage(Context context, CPushMessage cPushMessage) {
|
|
||||||
// Log.e("MyMessageReceiver", "onMessage, messageId: " + cPushMessage.getMessageId() + ", title: " + cPushMessage.getTitle() + ", content:" + cPushMessage.getContent());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onNotificationOpened(Context context, String title, String summary, String extraMap) {
|
|
||||||
// Log.e("MyMessageReceiver", "onNotificationOpened, title: " + title + ", summary: " + summary + ", extraMap:" + extraMap);
|
|
||||||
// Intent intent = new Intent();
|
|
||||||
// intent.setClass(context, RecentContactsActivity.class);
|
|
||||||
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
// context.startActivity(intent);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// protected void onNotificationClickedWithNoAction(Context context, String title, String summary, String extraMap) {
|
|
||||||
// Log.e("MyMessageReceiver", "onNotificationClickedWithNoAction, title: " + title + ", summary: " + summary + ", extraMap:" + extraMap);
|
|
||||||
// Intent intent = new Intent();
|
|
||||||
// intent.setClass(context, RecentContactsActivity.class);
|
|
||||||
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
// context.startActivity(intent);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// protected void onNotificationReceivedInApp(Context context, String title, String summary, Map<String, String> extraMap, int openType, String openActivity, String openUrl) {
|
|
||||||
// Log.e("MyMessageReceiver", "onNotificationReceivedInApp, title: " + title + ", summary: " + summary + ", extraMap:" + extraMap + ", openType:" + openType + ", openActivity:" + openActivity + ", openUrl:" + openUrl);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// protected void onNotificationRemoved(Context context, String messageId) {
|
|
||||||
// Log.e("MyMessageReceiver", "onNotificationRemoved");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
package com.ifish.tcp;
|
package com.ifish.tcp;
|
||||||
|
|
||||||
|
import static com.ifish.utils.Commons.Device;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.ifish.basebean.Device;
|
|
||||||
import com.ifish.utils.ByteUtil;
|
import com.ifish.utils.ByteUtil;
|
||||||
import com.ifish.utils.Commons;
|
import com.ifish.utils.Commons;
|
||||||
|
|
||||||
|
|
@ -13,9 +14,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.ifish.utils.Commons.Device;
|
|
||||||
import static com.ifish.utils.Commons.num;
|
|
||||||
|
|
||||||
public class ModelCodec {
|
public class ModelCodec {
|
||||||
/**
|
/**
|
||||||
* 把对象转成字节数
|
* 把对象转成字节数
|
||||||
|
|
@ -274,6 +272,8 @@ public class ModelCodec {
|
||||||
buffer.put(model.getWifiSSID());
|
buffer.put(model.getWifiSSID());
|
||||||
//wifi密码
|
//wifi密码
|
||||||
buffer.put(model.getWifiPWD());
|
buffer.put(model.getWifiPWD());
|
||||||
|
//用户id
|
||||||
|
buffer.put(Commons.USER.getUserIdBytes());
|
||||||
//crc16校验码
|
//crc16校验码
|
||||||
buffer.put(model.getCrc16_code());
|
buffer.put(model.getCrc16_code());
|
||||||
//tcp连接域名
|
//tcp连接域名
|
||||||
|
|
@ -292,6 +292,8 @@ public class ModelCodec {
|
||||||
buffer.put(model.getSsid_name());
|
buffer.put(model.getSsid_name());
|
||||||
//wifi密码
|
//wifi密码
|
||||||
buffer.put(model.getSsid_password());
|
buffer.put(model.getSsid_password());
|
||||||
|
//用户id
|
||||||
|
buffer.put(Commons.USER.getUserIdBytes());
|
||||||
//crc16校验码
|
//crc16校验码
|
||||||
buffer.put(model.getCrc16_code());
|
buffer.put(model.getCrc16_code());
|
||||||
//tcp连接域名
|
//tcp连接域名
|
||||||
|
|
@ -449,7 +451,7 @@ public class ModelCodec {
|
||||||
} else if (Check_code == 25) {
|
} else if (Check_code == 25) {
|
||||||
return decodexuanduo_get(buf);
|
return decodexuanduo_get(buf);
|
||||||
}
|
}
|
||||||
//switch语句
|
//todo switch语句
|
||||||
switch (length) {
|
switch (length) {
|
||||||
//长度为20,绑定wifi的反馈
|
//长度为20,绑定wifi的反馈
|
||||||
case 20: {
|
case 20: {
|
||||||
|
|
|
||||||
6
版本日志.txt
6
版本日志.txt
|
|
@ -15,5 +15,9 @@
|
||||||
10.友盟分享初始化逻辑变更,初始化分为预先初始化和正式初始化
|
10.友盟分享初始化逻辑变更,初始化分为预先初始化和正式初始化
|
||||||
11.下载功能适配android12+,解决高版本安卓手机无法更新APK的问题
|
11.下载功能适配android12+,解决高版本安卓手机无法更新APK的问题
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
12.增加阿里云镜像,版本控制移除local.pro
|
12.增加阿里云镜像,版本控制移除local.pro
|
||||||
13.增加airkiss,注意在发送前AirKissEncoder只能实例化一次,确保发送的随机数和接受的时候用来比较的随机数要保持一致
|
=======
|
||||||
|
12.增加阿里云镜像,版本控制移除local.pro
|
||||||
|
13.增加airkiss,注意在发送前AirKissEncoder只能实例化一次,确保发送的随机数和接受的时候用来比较的随机数要保持一致
|
||||||
|
>>>>>>> release
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
1.注意下面的几个版本要对上
|
||||||
|
|
||||||
|
classpath 'com.android.tools.build:gradle:4.2.2'
|
||||||
|
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||||
|
|
||||||
|
|
||||||
|
2.在gitlab上添加自己的ssh
|
||||||
|
注意,android studio - settings -Version Control - git -- 一定要勾选上use credential helper !!! 不然是无法push代码到gitlab的
|
||||||
|
|
||||||
|
3.android studio 版本不要太新,使用 2021.2.1 patch 2即可
|
||||||
Loading…
Reference in New Issue