mac
2024-01-04 e01efd770fcf79505e854965b16352bff0992910
2024年01月04日14:35:21

备份一下代码
2个文件已添加
22个文件已修改
984 ■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/HDLApp.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/config/ConstantManage.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/jpush/JPushMessageInfoBean.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/jpush/JPushReceiverService.java 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlDialogLogic.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlJpushLogic.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlMessageLogic.java 164 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/HomeLoginActivity.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/adapter/MessageAdapter.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/me/MeChangePasswordActivity.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageFragment.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageInfoActivity.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/message/NascentMessageFragment.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/message/RecoverMessageFragment.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/utils/TimeUtils.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-en/strings.xml 317 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-zh/strings.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/HDLApp.java
@@ -220,6 +220,7 @@
    private void initJPush() {
        JPushInterface.setDebugMode(true);
        JPushInterface.init(getBaseContext());
    }
app/src/main/java/com/hdl/photovoltaic/config/ConstantManage.java
@@ -18,7 +18,10 @@
    public static final String message_function_tab_switch = "message_function_tab_switch";
    //消息警告解决或者未解决
    public static final String message_function_push_post = "message_function_push";
    //消息数量
    public static final String message_count = "message_count";
    public static final String homepage_title_tab_switch = "homepage_title_tab_switch";
    //网络状态发生变化
    public static final String network_change_post = "network_change";
app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
@@ -90,6 +90,33 @@
    //app当前的语言
    private String currentAppLanguage;
    /// <summary>
    /// 注册极光ID
    /// </summary>
    public String registrationID;
    /// <summary>
    /// 添加极光ID到云端成功时返回的
    /// </summary>
    public String pushId;
    public String getRegistrationID() {
        return registrationID == null ? "" : registrationID;
    }
    public void setRegistrationID(String registrationID) {
        this.registrationID = registrationID;
    }
    public String getPushId() {
        return pushId == null ? "" : pushId;
    }
    public void setPushId(String pushId) {
        this.pushId = pushId;
    }
    public String getCurrentAppLanguage() {
        return currentAppLanguage;
    }
app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java
@@ -2,6 +2,9 @@
public class HttpApi {
    //添加推送Token
    public static final String POST_push_add = "/smart-footstone/app/push-information/add";
    //region **********【B端】和【C端】共用接口**********
    //mqtt连接需要(语雀接口地址:https://hdl-gz.yuque.com/wnkbmh/cdrglh/totdnt#40b28997)
    public static final String POST_Mqtt_GetRemoteInfo = "/home-wisdom/app/mqtt/getRemoteInfo";
app/src/main/java/com/hdl/photovoltaic/jpush/JPushMessageInfoBean.java
New file
@@ -0,0 +1,72 @@
package com.hdl.photovoltaic.jpush;
import java.io.Serializable;
/**
 * 极光推送的信息实体类
 */
public class JPushMessageInfoBean implements Serializable {
    // 住宅ID
    private String homeId;
    // 推送标题
    private String title;
    // 推送内容
    private String content;
    // 推送附加数据
    private String expandData;
    // 信息类型
    private String messageType;
    // 扩展数据内容
    private String expantContent;
    public String getHomeId() {
        return homeId == null ? "" : homeId;
    }
    public void setHomeId(String homeId) {
        this.homeId = homeId;
    }
    public String getTitle() {
        return title == null ? "" : title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getContent() {
        return content == null ? "" : content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getExpandData() {
        return expandData == null ? "" : expandData;
    }
    public void setExpandData(String extras) {
        this.expandData = extras;
    }
    public String getMessageType() {
        return messageType == null ? "" : messageType;
    }
    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }
    public String getExpantContent() {
        return expantContent == null ? "" : expantContent;
    }
    public void setExpantContent(String expantContent) {
        this.expantContent = expantContent;
    }
}
app/src/main/java/com/hdl/photovoltaic/jpush/JPushReceiverService.java
@@ -3,9 +3,15 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.other.HdlJpushLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.ui.MyPowerStationActivity;
import com.hdl.photovoltaic.ui.StartActivity;
@@ -13,6 +19,10 @@
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import org.greenrobot.eventbus.EventBus;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Objects;
import cn.jpush.android.api.CustomMessage;
import cn.jpush.android.api.JPushInterface;
@@ -42,23 +52,10 @@
     * @param message 接收到的通知内容
     */
    public void onNotifyMessageOpened(Context context, NotificationMessage message) {
        JPushMessageInfoBean jPushMessageInfoBean = pushDataProcessing(message);
        HdlJpushLogic.getInstance().JpushPushCommonData(context, jPushMessageInfoBean, true);
//        //点击后删除本地通知
//        JPushInterface.clearAllNotifications(context);
        HdlLogLogic.print("极光--->点击通知回调--->" + new Gson().toJson(message), true);
        Intent intent = new Intent(context, MyPowerStationActivity.class);
//        Bundle bundle = new Bundle();
//        bundle.putString(JPushInterface.EXTRA_NOTIFICATION_TITLE, message.notificationTitle);
//        bundle.putString(JPushInterface.EXTRA_ALERT, message.notificationContent);
//        intent.putExtras(bundle);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intent.putExtra("skip", "skip");//标识跳转
        context.startActivity(intent);
        BaseEventBus bus = new BaseEventBus();
        bus.setTopic(ConstantManage.message_function_push_post);
        EventBus.getDefault().postSticky(bus);
    }
    /**
@@ -68,8 +65,8 @@
     * @param message 接收到的通知内容
     */
    public void onNotifyMessageArrived(Context context, NotificationMessage message) {
        HdlLogLogic.print("极光--->接收到的通知内容--->" + new Gson().toJson(message), true);
        JPushMessageInfoBean jPushMessageInfoBean = pushDataProcessing(message);
        HdlJpushLogic.getInstance().JpushPushCommonData(context, jPushMessageInfoBean, false);
    }
    /**
@@ -92,4 +89,51 @@
        HdlLogLogic.print("极光--->长连接状态回调--->" + isConnected, true);
    }
    /**
     * 推送数据作处理
     */
    private JPushMessageInfoBean pushDataProcessing(NotificationMessage message) {
        try {
            JPushMessageInfoBean jPushMessageInfoBean = new JPushMessageInfoBean();
            String title = message.notificationTitle;
            String content = message.notificationContent;
            String pushData = message.notificationExtras;
            jPushMessageInfoBean.setTitle(title);
            jPushMessageInfoBean.setContent(content);
            if (TextUtils.isEmpty(pushData)) {
                return jPushMessageInfoBean;
            }
            JSONObject expandDataObject = JSON.parseObject(pushData);
            if (expandDataObject.containsKey("expandData")) {
                String expandDataJson = Objects.requireNonNull(expandDataObject.get("expandData")).toString();
                if (TextUtils.isEmpty(expandDataJson)) {
                    return jPushMessageInfoBean;
                }
                jPushMessageInfoBean.setExpandData(expandDataJson);
                JSONObject expantContentObject = JSON.parseObject(expandDataJson);
                if (expantContentObject.containsKey("messageType")) {
                    String messageType = Objects.requireNonNull(expantContentObject.get("messageType")).toString();
                    if (!TextUtils.isEmpty(messageType)) {
                        jPushMessageInfoBean.setMessageType(messageType);
                    }
                }
                if (expantContentObject.containsKey("homeId")) {
                    String homeId = Objects.requireNonNull(expantContentObject.get("homeId")).toString();
                    if (!TextUtils.isEmpty(homeId)) {
                        jPushMessageInfoBean.setHomeId(homeId);
                    }
                }
                if (expantContentObject.containsKey("expantContent")) {
                    String expantContentJosn = Objects.requireNonNull(expantContentObject.get("expantContent")).toString();
                    if (!TextUtils.isEmpty(expantContentJosn)) {
                        jPushMessageInfoBean.setExpantContent(expantContentJosn);
                    }
                }
            }
            return jPushMessageInfoBean;
        } catch (Exception e) {
            return new JPushMessageInfoBean();
        }
    }
}
app/src/main/java/com/hdl/photovoltaic/other/HdlDialogLogic.java
@@ -48,7 +48,7 @@
                ConfirmationCancelDialog dialog = new ConfirmationCancelDialog(context);
                dialog.setTitle(context.getString(R.string.loading_title_tip));
                dialog.setContent("请前往设置权限.");
                dialog.setContent(context.getString(R.string.please_go_set_permissions));
                dialog.setConfirmation(context.getString(R.string.me_set));
                dialog.show();
                dialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() {
app/src/main/java/com/hdl/photovoltaic/other/HdlJpushLogic.java
New file
@@ -0,0 +1,82 @@
package com.hdl.photovoltaic.other;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.enums.MessageStateType;
import com.hdl.photovoltaic.jpush.JPushMessageInfoBean;
import com.hdl.photovoltaic.ui.MyPowerStationActivity;
import com.hdl.photovoltaic.ui.bean.MessageBean;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import org.greenrobot.eventbus.EventBus;
/**
 * 极光推送信息处理逻辑
 */
public class HdlJpushLogic {
    private static volatile HdlJpushLogic sHdlJpushLogic;
    /**
     * 获取当前对象
     *
     * @return HdlAccountLogic
     */
    public static synchronized HdlJpushLogic getInstance() {
        if (sHdlJpushLogic == null) {
            synchronized (HdlJpushLogic.class) {
                if (sHdlJpushLogic == null) {
                    sHdlJpushLogic = new HdlJpushLogic();
                }
            }
        }
        return sHdlJpushLogic;
    }
    /**
     * 极光推送数据统一处理的方法
     *
     * @param context              上下文
     * @param jPushMessageInfoBean 推送数据对象实体
     * @param isOpened             true=点击通知栏回调,false=收到推送通知回调;
     */
    public void JpushPushCommonData(Context context, JPushMessageInfoBean jPushMessageInfoBean, boolean isOpened) {
        //添加在推送数据到缓存列表中;
        this.addPushDataToMemoryList(jPushMessageInfoBean);
        if (isOpened) {
            Intent intent = new Intent(context, MyPowerStationActivity.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
            intent.putExtra("skip", "skip");//里面判断有这个标识就跳转到消息中心界面
            context.startActivity(intent);
        } else {
            BaseEventBus bus = new BaseEventBus();
            bus.setTopic(ConstantManage.message_function_push_post);
            bus.setType(MessageStateType.untreated);
            EventBus.getDefault().post(bus);
        }
    }
    /**
     * 添加在推送数据到缓存列表中
     */
    private void addPushDataToMemoryList(JPushMessageInfoBean jPushMessageInfoBean) {
        if (TextUtils.isEmpty(jPushMessageInfoBean.getExpantContent())) {
            return;
        }
        Gson gson = new Gson();
        MessageBean messageBean = gson.fromJson(jPushMessageInfoBean.getExpantContent(), MessageBean.class);
        if (messageBean == null) {
            return;
        }
        messageBean.setTitle(jPushMessageInfoBean.getTitle());
        messageBean.setDeviceDesc(jPushMessageInfoBean.getContent());
        HdlMessageLogic.getInstance().setListMessage(messageBean, 0);
        HdlLogLogic.print("添加在推送数据到缓存列表中--->成功");
    }
}
app/src/main/java/com/hdl/photovoltaic/other/HdlMessageLogic.java
@@ -1,5 +1,6 @@
package com.hdl.photovoltaic.other;
import android.os.Build;
import android.text.TextUtils;
import com.google.gson.Gson;
@@ -12,6 +13,7 @@
import com.hdl.photovoltaic.ui.bean.MessageBean;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@@ -50,13 +52,17 @@
        List<MessageBean> newList = new ArrayList<>();
        for (int i = 0; i < mListMessage.size(); i++) {
            MessageBean messageBean = mListMessage.get(i);
            if (messageBean == null) {
                continue;
            }
            if (messageBean.getStatus().equals(MessageStateType.untreated)) {
                newList.add(messageBean);
            }
        }
        return newList;
        return sortList(newList);
    }
    /**
     * 获取恢复中缓存列表
@@ -73,6 +79,49 @@
            }
        }
        return sortList(newList);
    }
    /**
     * 列表进行排序
     *
     * @param list 源数据
     * @return -
     */
    private List<MessageBean> sortList(List<MessageBean> list) {
        List<MessageBean> newList = new ArrayList<>();
        List<MessageBean> readList = new ArrayList<>();
        List<MessageBean> unReadList = new ArrayList<>();
        for (int i = 0; i < list.size(); i++) {
            MessageBean messageBean = list.get(i);
            if (messageBean.isRead()) {
                //已读
                readList.add(messageBean);
            } else {
                //未读
                unReadList.add(messageBean);
            }
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            readList.sort(new Comparator<MessageBean>() {
                @Override
                public int compare(MessageBean o1, MessageBean o2) {
                    if (o1 == null && o2 == null) {
                        return -1;
                    }
                    //倒序(顺序 Long.compare(o2.getCreateTime(), o1.getCreateTime()))
                    return Long.compare(o1.getCreateTime(), o2.getCreateTime());
                }
            });
        }
        if (unReadList.size() > 0) {
            newList.addAll(unReadList);
        }
        if (readList.size() > 0) {
            newList.addAll(readList);
        }
        return newList;
    }
@@ -80,22 +129,31 @@
        return mListMessage;
    }
    /**
     * 添加消息到列表里面
     * 设置读取状态
     *
     * @param list -
     * @param msgId            -消息ID
     * @param read             是否已读取 true表示已读取
     * @param messageStateType UNTREATED : 未处理,PROCESSED : 已处理
     */
    public void setListMessage(List<MessageBean> list) {
    public void setMessageState(long msgId, boolean read, String messageStateType) {
        try {
            if (list == null || list.size() == 0) {
            if (msgId == 0) {
                return;
            }
            if (this.mListMessage.size() == 0) {
                this.mListMessage.addAll(list);
                return;
            }
            for (int i = 0; i < list.size(); i++) {
                this.setListMessage(list.get(i));
            for (int i = 0; i < mListMessage.size(); i++) {
                MessageBean messageBean = mListMessage.get(i);
                if (messageBean == null) {
                    continue;
                }
                if (messageBean.getMsgId() == msgId) {
                    messageBean.setRead(read);
                    if (!TextUtils.isEmpty(messageStateType)) {
                        messageBean.setStatus(messageStateType);
                    }
                    break;
                }
            }
        } catch (Exception ignored) {
        }
@@ -124,6 +182,60 @@
            if (!if_boolean) {
                //没有添加
                this.mListMessage.add(messageBean);
            }
        } catch (Exception e) {
            String mes = e.getMessage();
            HdlLogLogic.print("--->" + mes);
        }
    }
    /**
     * 添加消息到列表里面
     *
     * @param messageBean -
     * @param position    表示加到列表的位置
     */
    public void setListMessage(MessageBean messageBean, int position) {
        try {
            if (messageBean == null) {
                return;
            }
            boolean if_boolean = false;
            for (int i = 0; i < mListMessage.size(); i++) {
                if (mListMessage.get(i).getMsgId().toString().equals(messageBean.getMsgId().toString())) {
                    //存在替换
                    mListMessage.remove(i);
                    mListMessage.add(i, messageBean);
                    if_boolean = true;
                    break;
                }
            }
            if (!if_boolean) {
                //没有添加
                this.mListMessage.add(position, messageBean);
            }
        } catch (Exception e) {
            String mes = e.getMessage();
            HdlLogLogic.print("--->" + mes);
        }
    }
    /**
     * 添加消息到列表里面
     *
     * @param list -
     */
    public void setListMessage(List<MessageBean> list) {
        try {
            if (list == null || list.size() == 0) {
                return;
            }
            if (this.mListMessage.size() == 0) {
                this.mListMessage.addAll(list);
                return;
            }
            for (int i = 0; i < list.size(); i++) {
                this.setListMessage(list.get(i));
            }
        } catch (Exception ignored) {
        }
@@ -215,11 +327,11 @@
                    return;
                }
                Gson gson = new Gson();
                MessageListClass messageListClass = gson.fromJson(jsonStr, MessageListClass.class);
                list.addAll(messageListClass.getList());
                setListMessage(messageListClass.getList());
                MessageListClass oldMessageListClass = gson.fromJson(jsonStr, MessageListClass.class);
                list.addAll(oldMessageListClass.getList());
                setListMessage(oldMessageListClass.getList());
                //总共有多少页
                long totalPage = messageListClass.totalPage;
                long totalPage = oldMessageListClass.totalPage;
                if (totalPage < 2) {
                    if (cloudCallBeak != null) {
                        cloudCallBeak.onSuccess(list);
@@ -235,9 +347,9 @@
                        @Override
                        public void onSuccess(String jsonStr) {
                            atomicInteger.set(atomicInteger.get() + 1);
                            MessageListClass messageListClass1 = gson.fromJson(jsonStr, MessageListClass.class);
                            list.addAll(messageListClass1.getList());
                            setListMessage(messageListClass.getList());
                            MessageListClass newMessageListClass = gson.fromJson(jsonStr, MessageListClass.class);
                            list.addAll(newMessageListClass.getList());
                            setListMessage(newMessageListClass.getList());
                            if (atomicInteger.get() == totalPage - 1) {
                                //最后一条退出
                                if (cloudCallBeak != null) {
@@ -285,7 +397,7 @@
            json.addProperty("status", messageStateType);
        }
        json.addProperty("pageNo", 1);//页码
        json.addProperty("pageSize", pageSize);//页数
        json.addProperty("pageSize", 50);//页数
        List<MessageBean> list = new ArrayList<>();
        HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() {
@@ -298,11 +410,11 @@
                    return;
                }
                Gson gson = new Gson();
                MessageListClass messageListClass = gson.fromJson(jsonStr, MessageListClass.class);
                list.addAll(messageListClass.getList());
                setListMessage(messageListClass.getList());
                MessageListClass oldMessageListClass = gson.fromJson(jsonStr, MessageListClass.class);
                list.addAll(oldMessageListClass.getList());
                setListMessage(oldMessageListClass.getList());
                //总共有多少页
                long totalPage = messageListClass.totalPage;
                long totalPage = oldMessageListClass.totalPage;
                if (totalPage < 2) {
                    if (cloudCallBeak != null) {
                        cloudCallBeak.onSuccess(list);
@@ -318,9 +430,9 @@
                        @Override
                        public void onSuccess(String jsonStr) {
                            atomicInteger.set(atomicInteger.get() + 1);
                            MessageListClass messageListClass1 = gson.fromJson(jsonStr, MessageListClass.class);
                            list.addAll(messageListClass1.getList());
                            setListMessage(messageListClass.getList());
                            MessageListClass newMessageListClass = gson.fromJson(jsonStr, MessageListClass.class);
                            list.addAll(newMessageListClass.getList());
                            setListMessage(newMessageListClass.getList());
                            if (atomicInteger.get() == totalPage - 1) {
                                //最后一条退出
                                if (cloudCallBeak != null) {
app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
@@ -2,12 +2,14 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.photovoltaic.bean.HttpResponsePack;
import com.hdl.photovoltaic.config.AppConfigManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.internet.HttpClient;
import com.hdl.photovoltaic.internet.api.HttpApi;
@@ -646,6 +648,41 @@
        });
    }
    /**
     * 添加推送Token
     *
     * @param cloudCallBeak -
     */
    public void pushAdd(CloudCallBeak<String> cloudCallBeak) {
        String requestUrl = HttpApi.POST_push_add;
        JsonObject json = new JsonObject();
        json.addProperty("deviceName", Build.MODEL);//设备名称
        json.addProperty("deviceType", "Android");//设备类型
        json.addProperty("produce", AppConfigManage.isIsOnlineServer());//是否是生成版本
        json.addProperty("pushToken", UserConfigManage.getInstance().getRegistrationID());//App的推送Token,在极光为RegId
        json.addProperty("software", "PHOTOVOLTAIC");//软件来源
        HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String jsonStr) {
                if (cloudCallBeak != null) {
                    cloudCallBeak.onSuccess(jsonStr);
                }
            }
            @Override
            public void onFailure(HDLException e) {
                if (cloudCallBeak != null) {
                    cloudCallBeak.onFailure(e);
                }
            }
        });
    }
    static class HouseBeanClass {
        //总条数
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -1087,7 +1087,7 @@
                    public void onSuccess(Boolean obj) {
                        GatewayBean gatewayBean = HDLLinkLocalGateway.getInstance().getLocalGateway(mac);
                        if (gatewayBean == null) {
                            uniCallbackData(null, -100, "本地找不到网关", callback);
                            uniCallbackData(null, -100, HDLApp.getInstance().getString(R.string.The_gateway_cannot_be_found_locally), callback);
                            return;
                        }
@@ -1218,7 +1218,7 @@
    private void sendModBus(Object data, DCUniMPJSCallback callback) {
        String tempData = getKeyValue("data", data);
        if (TextUtils.isEmpty(tempData)) {
            HdlLogLogic.print("data内容为空", false);
            HdlLogLogic.print("data内容为空--->", false);
            return;
        }
        ModBusBean modBusBean = new Gson().fromJson(tempData, ModBusBean.class);
@@ -1229,7 +1229,7 @@
//            modBusBean.setOid("0101050217BBC400");
//        }
        if (modBusBean.getMac() == null || modBusBean.getData() == null) {
            HdlLogLogic.print("内容为空===oid=" + modBusBean.getMac() + " data=" + Arrays.toString(modBusBean.getData()), false);
            HdlLogLogic.print("内容为空--->oid--->" + modBusBean.getMac() + " data--->" + Arrays.toString(modBusBean.getData()), false);
            return;
        }
@@ -1305,7 +1305,7 @@
            }
        } catch (Exception e) {
            HdlLogLogic.print("uni===组装uni发送数据格式===" + e.getMessage(), false);
            HdlLogLogic.print("uni--->组装uni发送数据格式--->" + e.getMessage(), false);
        }
app/src/main/java/com/hdl/photovoltaic/ui/HomeLoginActivity.java
@@ -127,6 +127,12 @@
     */
    private void initEvent() {
        viewBinding.homeLoginMoreIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                HdlThreadLogic.toast(_mActivity, getString(R.string.loading_not_supported));
            }
        });
        //语言选择
        viewBinding.homeLoginLanguageTv.setOnClickListener(new View.OnClickListener() {
            @Override
@@ -265,7 +271,7 @@
                                            if (System.currentTimeMillis() < e.getmExtra().getUnlockTime()) {
                                                long time = e.getmExtra().getUnlockTime() - System.currentTimeMillis();
                                                int minute = Integer.parseInt(TimeUtils.getMinuteTime(time));
                                                HdlThreadLogic.toast(_mActivity, e.getMsg() + "剩余" + minute + "分钟" + "(" + e.getCode() + ")");
                                                HdlThreadLogic.toast(_mActivity, e.getMsg() + getString(R.string.residue) + minute + getString(R.string.minute) + "(" + e.getCode() + ")");
                                            }
                                        }
                                    } catch (Exception ee) {
@@ -394,7 +400,9 @@
        }
        String s = textView.getText().toString();
        if (!s.contains("《")) {
            return;
        }
        int startIndex1 = s.indexOf("《");
        int endIndex1 = s.indexOf("》") + 1;
app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java
@@ -12,9 +12,12 @@
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Process;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.hdl.linkpm.sdk.core.exception.HDLException;
@@ -23,21 +26,25 @@
import com.hdl.photovoltaic.base.CustomBaseActivity;
import com.hdl.photovoltaic.bean.MqttInfo;
import com.hdl.photovoltaic.broadcast.NetworkChangeReceiver;
import com.hdl.photovoltaic.config.AppConfigManage;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.databinding.ActivityMyPowerStationBinding;
import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
import com.hdl.photovoltaic.enums.NetworkType;
import com.hdl.photovoltaic.jpush.JPushMessageInfoBean;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlDeviceLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlMqttLogic;
import com.hdl.photovoltaic.other.HdlOtaLogic;
import com.hdl.photovoltaic.other.HdlResidenceLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.other.HdlUniLogic;
import com.hdl.photovoltaic.ui.bean.BUserInfo;
import com.hdl.photovoltaic.ui.bean.DeviceRemoteInfo;
import com.hdl.photovoltaic.ui.bean.HouseIdBean;
import com.hdl.photovoltaic.ui.bean.OidBean;
import com.hdl.photovoltaic.uni.HDLUniMP;
import com.hdl.photovoltaic.utils.AppManagerUtils;
@@ -57,7 +64,11 @@
import org.greenrobot.eventbus.ThreadMode;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import cn.jpush.android.api.JPushInterface;
/**
@@ -94,12 +105,62 @@
        this.initMqttClient();
        //监听网络状态变化
        this.networkMonitoring();
        //上传极光注册ID
        this.pushTokens();
        //点击极光通知栏消息进来
        this.clickJpushNotificationMessage();
        //通知限权
        this.notificationSet();
    }
    /**
     * 上传极光注册ID
     */
    private void pushTokens() {
        HdlThreadLogic.runSubThread(new Runnable() {
            @Override
            public void run() {
                String registrationID = JPushInterface.getRegistrationID(_mActivity);
                int addCount = 0;
                while (TextUtils.isEmpty(registrationID)) {
                    SystemClock.sleep(1000);//1s休眠
                    registrationID = JPushInterface.getRegistrationID(_mActivity);
                    addCount++;
                    if (addCount > 5) {
                        //5s超时
                        break;
                    }
                }
                if (!TextUtils.isEmpty(registrationID)) {
                    UserConfigManage.getInstance().setRegistrationID(registrationID);
                    UserConfigManage.getInstance().Save();
                    String finalRegistrationID = registrationID;
                    HdlResidenceLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
                        @Override
                        public void onSuccess(String pushId) {
                            if (!TextUtils.isEmpty(pushId)) {
                                UserConfigManage.getInstance().setPushId(pushId);
                                UserConfigManage.getInstance().Save();
                            }
                            HdlLogLogic.print("添加推送极光ID--->registrationID===" + finalRegistrationID, true);
                        }
                        @Override
                        public void onFailure(HDLException e) {
                            HdlLogLogic.print("添加推送极光ID失败--->registrationID===" + finalRegistrationID, true);
                        }
                    });
                }
            }
        });
    }
    /**
@@ -183,7 +244,7 @@
    }
    private void initView() {
        viewBinding.myPowerStationBottomIl1.titleTv.setText("首页");//
        viewBinding.myPowerStationBottomIl1.titleTv.setText(R.string.power_shome_page);//
        viewBinding.myMessageBottomIl2.titleTv.setText(R.string.message);
        viewBinding.myMeBottomIl3.titleTv.setText(R.string.power_station_me);
        this.bottomViewChangeOfStyle();
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java
@@ -63,13 +63,17 @@
        //发电功率
        String power = mContext.getString(R.string.power_station_generated_power) + kw + "kW";
        holder.powerTv.setText(power);
        holder.itemView.setTag(position);
        setTextViewStyle(holder.stateTv, houseIdBean.getPowerStationStatus());
        GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, new RoundedCorners(4));
        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (noOnclickListener != null) {
                    noOnclickListener.onClick(holder.getAdapterPosition(), houseIdBean);
                try {
                    if (noOnclickListener != null) {
                        noOnclickListener.onClick((int) holder.itemView.getTag(), houseIdBean);
                    }
                } catch (Exception ignored) {
                }
            }
        });
app/src/main/java/com/hdl/photovoltaic/ui/adapter/MessageAdapter.java
@@ -43,7 +43,7 @@
        MessageBean messageBean = this.mList.get(position);
        holder.item_content_tv.setText(messageBean.getTitle());
        holder.item_home_name_tv.setText(messageBean.getHomeName());
        String date = TimeUtils.getDateTimestamp(messageBean.getCreateTime());
        String date = TimeUtils.getTimeFromTimestamp(messageBean.getCreateTime());
        holder.item_time_tv.setText(date);
        String type = "";//FAULT:故障,WARN:告警,EVENT:事件
        Drawable drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_ffb300);
@@ -54,7 +54,7 @@
            type = mContext.getString(R.string.message_alarm);
            drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_ffb300);
        } else if (messageBean.getType().equals(MessageAlarmStateType.event)) {
            type = "事件";
            type =mContext.getString(R.string.event);
            drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_ffb300);
        }
        holder.item_estate_tv.setText(type);
@@ -63,11 +63,16 @@
        if (messageBean.isRead()) {
            holder.item_unread_message_tv.setVisibility(View.GONE);
        }
        //标记索引
        holder.itemView.setTag(position);
        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (noOnclickListener != null) {
                    noOnclickListener.onClick(holder.getAdapterPosition(), messageBean);
                try {
                    if (noOnclickListener != null) {
                        noOnclickListener.onClick((int) holder.itemView.getTag(), messageBean);
                    }
                } catch (Exception ignored) {
                }
            }
        });
app/src/main/java/com/hdl/photovoltaic/ui/me/MeChangePasswordActivity.java
@@ -97,7 +97,7 @@
                // 二次确认提示框
                ConfirmationCancelDialog dialog = new ConfirmationCancelDialog(_mActivity);
                dialog.setTitle(getString(R.string.loading_title_tip));
                dialog.setContent("密码修改成功,将重新登录.");
                dialog.setContent(_mActivity.getString(R.string.home_password_changed_successfully_log_in));
                dialog.show();
                dialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() {
                    @Override
@@ -211,7 +211,7 @@
            return false;
        }
        if (oldPsw.equals(newPsw)) {
            HdlThreadLogic.tipFlashingBox(_mActivity, true, "原密码和新密码不能一样.", -1);
            HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_old_password_not_new_password), -1);
            return false;
        }
        return true;
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageFragment.java
@@ -15,8 +15,10 @@
import com.hdl.photovoltaic.databinding.FragmentMessageBinding;
import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
import com.hdl.photovoltaic.enums.MessageFunctionTabSwitch;
import com.hdl.photovoltaic.enums.MessageStateType;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlMessageLogic;
import com.hdl.photovoltaic.ui.bean.BUserInfo;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
@@ -224,6 +226,14 @@
                EventBus.getDefault().removeStickyEvent(eventBus);
            }
        } else if (eventBus.getTopic().equals(ConstantManage.message_count)) {
            if (eventBus.getType().equals(MessageStateType.untreated)) {
                String s = getText(R.string.message_nascent) + "(" + HdlMessageLogic.getInstance().getNascentMessageMemoryList().size() + ")";
                viewBinding.messageTabNascentTitleTv.setText(s);
            } else if (eventBus.getType().equals(MessageStateType.processed)) {
                String s = getText(R.string.message_recover) + "(" + HdlMessageLogic.getInstance().getRecoverMessageMemoryList().size() + ")";
                viewBinding.messageTabRecoverTitleTv.setText(s);
            }
        }
    }
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageInfoActivity.java
@@ -77,7 +77,7 @@
                        viewBinding.messageInfoAlarmDeviceIn.rightContentTv.setText(mMessageBean.getDeviceDesc());
                        viewBinding.messageInfoAlarmRangeIn.rightContentTv.setText(mMessageBean.getEffectScopeDesc());
                        viewBinding.messageInfoPowerStationLocationIn.rightContentTv.setText(mMessageBean.getLocationAddress());
                        String date = TimeUtils.getDateTimestamp(mMessageBean.getCreateTime());
                        String date = TimeUtils.getTimeFromTimestamp(mMessageBean.getCreateTime());
                        viewBinding.messageInfoAlarmTimeIn.rightContentTv.setText(date);
                        String type = "";//FAULT:故障,WARN:告警,EVENT:事件
@@ -89,7 +89,7 @@
                            type = _mActivity.getString(R.string.message_alarm);
                            drawable = AppCompatResources.getDrawable(_mActivity, R.drawable.alarm_ffb300);
                        } else if (mMessageBean.getType().equals(MessageAlarmStateType.event)) {
                            type = "事件";
                            type = _mActivity.getString(R.string.event);
                            drawable = AppCompatResources.getDrawable(_mActivity, R.drawable.alarm_ffb300);
                        }
                        viewBinding.messageInfoAlarmStateTv.setText(type);
@@ -116,11 +116,12 @@
        viewBinding.toolbarTopIn.topBackBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mMessageBean == null) {
                    return;
                }
                //恢复进来只是查看的
                if (mMessageBean.getStatus().equals(MessageStateType.untreated)) {
                    mMessageBean.setRead(true);
                    mMessageBean.setStatus(MessageStateType.untreated);
                    HdlMessageLogic.getInstance().setListMessage(mMessageBean);
                    HdlMessageLogic.getInstance().setMessageState(mMessageBean.getMsgId(), true, MessageStateType.untreated);
                    BaseEventBus baseEventBus = new BaseEventBus();
                    baseEventBus.setTopic(ConstantManage.message_function_push_post);
                    baseEventBus.setType(MessageStateType.untreated);
@@ -133,11 +134,12 @@
        viewBinding.messageInfoBackTv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mMessageBean == null) {
                    return;
                }
                //恢复进来只是查看的
                if (mMessageBean.getStatus().equals(MessageStateType.untreated)) {
                    mMessageBean.setRead(true);
                    mMessageBean.setStatus(MessageStateType.untreated);
                    HdlMessageLogic.getInstance().setListMessage(mMessageBean);
                    HdlMessageLogic.getInstance().setMessageState(mMessageBean.getMsgId(), true, MessageStateType.untreated);
                    BaseEventBus baseEventBus = new BaseEventBus();
                    baseEventBus.setTopic(ConstantManage.message_function_push_post);
                    baseEventBus.setType(MessageStateType.untreated);
@@ -153,16 +155,23 @@
                HdlMessageLogic.getInstance().getMessageMessageSolve(mMsgId, new CloudCallBeak<Boolean>() {
                    @Override
                    public void onSuccess(Boolean obj) {
                        if (mMessageBean == null) {
                            return;
                        }
                        //恢复进来只是查看的
                        if (mMessageBean.getStatus().equals(MessageStateType.untreated)) {
                            //重置变量
                            mMessageBean.setRead(true);
                            mMessageBean.setStatus(MessageStateType.processed);
                            HdlMessageLogic.getInstance().setListMessage(mMessageBean);
                            BaseEventBus baseEventBus = new BaseEventBus();
                            baseEventBus.setTopic(ConstantManage.message_function_push_post);
                            baseEventBus.setType(MessageStateType.processed);
                            EventBus.getDefault().post(baseEventBus);
                            HdlMessageLogic.getInstance().setMessageState(mMessageBean.getMsgId(), true, MessageStateType.processed);
                            //已处理要更新数据
                            BaseEventBus processedBus = new BaseEventBus();
                            processedBus.setTopic(ConstantManage.message_function_push_post);
                            processedBus.setType(MessageStateType.processed);
                            EventBus.getDefault().post(processedBus);
                            //未处理要更新数据
                            BaseEventBus untreatedBus = new BaseEventBus();
                            untreatedBus.setTopic(ConstantManage.message_function_push_post);
                            untreatedBus.setType(MessageStateType.untreated);
                            EventBus.getDefault().post(untreatedBus);
                        }
                        finish();
app/src/main/java/com/hdl/photovoltaic/ui/message/NascentMessageFragment.java
@@ -18,6 +18,7 @@
import com.hdl.photovoltaic.enums.MessageFunctionTabSwitch;
import com.hdl.photovoltaic.enums.MessageStateType;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlMessageLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.ui.adapter.MessageAdapter;
@@ -123,6 +124,15 @@
            this.messageNascentAdapter.setList(mList);
            this.messageNascentAdapter.notifyDataSetChanged();
        }
        if (mList.size() > 0) {
            BaseEventBus baseEventBus = new BaseEventBus();
            baseEventBus.setTopic(ConstantManage.message_count);
            baseEventBus.setType(MessageStateType.untreated);
            baseEventBus.setData(mList.size());
            EventBus.getDefault().post(baseEventBus);
        }
    }
    @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
app/src/main/java/com/hdl/photovoltaic/ui/message/RecoverMessageFragment.java
@@ -103,6 +103,14 @@
            this.messageRecoverAdapter.setList(mList);
            this.messageRecoverAdapter.notifyDataSetChanged();
        }
        if (mList.size() > 0) {
            BaseEventBus baseEventBus = new BaseEventBus();
            baseEventBus.setTopic(ConstantManage.message_count);
            baseEventBus.setType(MessageStateType.processed);
            baseEventBus.setData(mList.size());
            EventBus.getDefault().post(baseEventBus);
        }
    }
    @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
@@ -124,6 +132,7 @@
                //消息详情回调
                initData();
                updateListData();
            }
        }
    }
app/src/main/java/com/hdl/photovoltaic/utils/TimeUtils.java
@@ -37,7 +37,7 @@
     */
    public static String getDateTimestamp(long timestamp) {
        try {
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH);
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd ", Locale.ENGLISH);
            Date date = new Date(timestamp);
            return dateFormat.format(date);
        } catch (Exception e) {
app/src/main/res/values-en/strings.xml
@@ -1,6 +1,6 @@
<resources>
    <!--    <string name="app_name">PhotovoltaicDebug</string>-->
    <string name="app_name">智慧能源</string>
    <string name="app_name">Smart energy</string>
    <string name="title_activity_home_login">HomeLoginActivity</string>
    <!-- Strings used for fragments for navigation -->
    <string name="first_fragment_label">First Fragment</string>
@@ -13,184 +13,195 @@
    <!--登录模块-->
    <string name="home_login_chinese">简体中文</string>
    <string name="home_login_hdl_stored_energy">HDL光伏储能</string>
    <string name="home_login_an_installer">我是安装商</string>
    <string name="home_login__input_phone_email">请输入手机号/邮箱号</string>
    <string name="home_login_input_phone">请输入手机号</string>
    <string name="home_login_email_address">邮箱号</string>
    <string name="home_login_input_psw">请输入密码</string>
    <string name="home_login_register">注册</string>
    <string name="home_login_forget_password">忘记密码</string>
    <string name="home_login_change_password">修改密码</string>
    <string name="home_login_logoin">登录</string>
    <string name="home_login_be_logging_in">登录中…</string>
    <string name="home_login_power_station">体验电站</string>
    <string name="home_login_consent_service_agreement">同意《服务协议》和《用户信息保护规定》</string>
    <string name="home_login_error_account_null">账号不能为空.</string>
    <string name="home_login_error_password_null">密码不能为空.</string>
    <string name="home_login_error_account_or_password">账号或者密码不对,请重新输入.</string>
    <string name="home_login_error_6_16_str">密码不符合最低安全要求,最少6–16个字符.</string>
    <string name="home_login_error_password_6">密码不能小于6个字符.</string>
    <string name="home_login_error_password_16">密码不能大于16个字符.</string>
    <string name="home_login_input_6_16">请输入6–16位的密码</string>
    <string name="home_login_confirm_psw">请再次确认密码</string>
    <string name="home_login_phone">手机号</string>
    <string name="home_login_email">邮箱</string>
    <string name="home_login_input_mail">请输入邮箱</string>
    <string name="home_login_national_region">请选择国家/区域</string>
    <string name="home_login_verification_code">获取验证码</string>
    <string name="home_login_input_verification_code">请输入验证码</string>
    <string name="home_login_confirm_reset">确认重置</string>
    <string name="home_login_null_verification_code">验证码不能为空.</string>
    <string name="home_login_phone_null">手机号不能为空.</string>
    <string name="home_login_mail_null">邮箱不能为空.</string>
    <string name="home_login_psw_unlikeliness">两次输入密码不一样.</string>
    <string name="home_login_psw_verification_repeater">后重发</string>
    <string name="home_login_verification_regain">重新获取</string>
    <string name="home_login_pws_reset_succeeded">密码重置成功</string>
    <string name="home_login_back_login">返回登录</string>
    <string name="home_login_send_mail">发送至邮箱</string>
    <string name="home_login_already_exists">该用户已存在,可直接登录</string>
    <string name="home_login_old_pws">原密码</string>
    <string name="home_login_new_pws">新密码</string>
    <string name="home_login_affirm_psw">确认密码</string>
    <string name="home_login_affirm">确认</string>
    <string name="home_login_least6">密码至少6位字符</string>
    <string name="home_login_input_old_pws">请输入原密码</string>
    <string name="home_login_input_new_pws">请输入新密码</string>
    <string name="home_login_input_affirm_psw">请再次输入新密码</string>
    <string name="home_login_input_unlike_psw">新密码和确认密码不一致.</string>
    <string name="home_login_change_name_succeed">修改备注成功.</string>
    <string name="verification">验证码</string>
    <string name="home_phone_number">区号</string>
    <string name="home_chinese_mainland">中国大陆</string>
    <string name="home_login_hdl_stored_energy">HDL Solar Energy</string>
    <string name="home_login_an_installer">I am an installer</string>
    <string name="home_login__input_phone_email">Please enter your phone number/email address</string>
    <string name="home_login_input_phone">Please enter your phone number</string>
    <string name="home_login_email_address">Email address</string>
    <string name="home_login_input_psw">Please enter your password</string>
    <string name="home_login_register"> Register</string>
    <string name="home_login_forget_password">Forgot password</string>
    <string name="home_login_change_password">Change password</string>
    <string name="home_login_logoin">Log in</string>
    <string name="home_login_be_logging_in">Logging in…</string>
    <string name="home_login_power_station">Guest mode</string>
    <string name="home_login_consent_service_agreement">Agree to the 《Service Agreement》 and 《User Information Protection Regulations》</string>
    <string name="home_login_error_account_null">Account cannot be empty.</string>
    <string name="home_login_error_password_null">Password cannot be empty.</string>
    <string name="home_login_error_account_or_password">Incorrect account or password, please re-enter.</string>
    <string name="home_login_error_6_16_str">Password does not meet minimum security requirements, must be 6-16 characters.</string>
    <string name="home_login_error_password_6">Password cannot be less than 6 characters.</string>
    <string name="home_login_error_password_16">Password cannot be more than 16 characters.</string>
    <string name="home_login_input_6_16">Please enter a 6-16 character password</string>
    <string name="home_login_confirm_psw">Please confirm your password again</string>
    <string name="home_login_phone">Phone number</string>
    <string name="home_login_email">Email</string>
    <string name="home_login_input_mail">Please enter your email address</string>
    <string name="home_login_national_region">Please select country/region</string>
    <string name="home_login_verification_code">Get verification code</string>
    <string name="home_login_input_verification_code">Please enter verification code</string>
    <string name="home_login_confirm_reset">Confirm reset</string>
    <string name="home_login_null_verification_code">Verification code cannot be empty.</string>
    <string name="home_login_phone_null">Phone number cannot be empty.</string>
    <string name="home_login_mail_null">Email cannot be empty.</string>
    <string name="home_login_psw_unlikeliness">Passwords do not match.</string>
    <string name="home_login_psw_verification_repeater">Resend later</string>
    <string name="home_login_verification_regain">Reacquire</string>
    <string name="home_login_pws_reset_succeeded"> Password reset successful</string>
    <string name="home_login_back_login">Back to login</string>
    <string name="home_login_send_mail">Send to email</string>
    <string name="home_login_already_exists">This user already exists, you can log in directly</string>
    <string name="home_login_old_pws">Current password</string>
    <string name="home_login_new_pws">New password</string>
    <string name="home_login_affirm_psw">Confirm password</string>
    <string name="home_login_affirm">Confirm</string>
    <string name="home_login_least6">Password must be at least 6 characters</string>
    <string name="home_login_input_old_pws">Please enter your current password</string>
    <string name="home_login_input_new_pws">Please enter your new password</string>
    <string name="home_login_input_affirm_psw">Please enter your new password again</string>
    <string name="home_login_input_unlike_psw">New password and confirm password do not match.</string>
    <string name="home_login_change_name_succeed">Remark successfully updated.</string>
    <string name="verification">Verification code</string>
    <string name="home_phone_number">Area code</string>
    <string name="home_chinese_mainland">Mainland China</string>
    <string name="home_password_changed_successfully_log_in">The password has been successfully changed. Please log in again.</string>
    <string name="home_old_password_not_new_password">The original password and the new password should not be identical.</string>
    <!--我的电站-->
    <string name="power_station">电站</string>
    <string name="power_station_me">我的</string>
    <string name="my_power_station">我的电站</string>
    <string name="power_station_generated_power">发电功率:</string>
    <string name="power_station_Power_generation_today">今日发电</string>
    <string name="power_station_creation_time">创建时间</string>
    <string name="my_power_station_installed_capacity">装机容量:</string>
    <string name="my_power_station_connecting">连接中</string>
    <string name="my_power_station_off_line">离线</string>
    <string name="my_power_station_malfunction">故障</string>
    <string name="my_power_station_operation">运行</string>
    <string name="my_power_station_await">待机</string>
    <string name="power_shome_page">Homepage</string>
    <string name="power_station">Power station</string>
    <string name="power_station_me">Mine</string>
    <string name="my_power_station">My power station</string>
    <string name="power_station_generated_power">Power generation:</string>
    <string name="power_station_Power_generation_today">Today power generation</string>
    <string name="power_station_creation_time">Established at</string>
    <string name="my_power_station_installed_capacity">Installed capacity:</string>
    <string name="my_power_station_connecting">Connecting</string>
    <string name="my_power_station_off_line">Offline</string>
    <string name="my_power_station_malfunction">Malfunction</string>
    <string name="my_power_station_operation">Operating</string>
    <string name="my_power_station_await">Standby</string>
    <!--设备-->
    <string name="device_manual_connection">手动连接</string>
    <string name="device_loading">加载中…</string>
    <string name="device_manual_connection">Manual connect</string>
    <string name="device_loading">Loading…</string>
    <!--告警消息-->
    <string name="message">消息</string>
    <string name="message_all">全部</string>
    <string name="message_nascent">发生中</string>
    <string name="message_recover">已恢复</string>
    <string name="message_alarm_info">报警详情</string>
    <string name="message_alarm">告警</string>
    <string name="message_alarm_malfunction">故障</string>
    <string name="messagealarm_details_content">报警内容</string>
    <string name="messagealarm_details_device">报警设备</string>
    <string name="message_alarm_detailsaffect_region">影响范围</string>
    <string name="message_alarm_detailspower_station_location">电站位置</string>
    <string name="message_alarm_details_time">报警时间</string>
    <string name="message_alarm_details_back">返回</string>
    <string name="message_alarm_details_resolved">已解决</string>
    <string name="message">Message</string>
    <string name="message_all">All</string>
    <string name="message_nascent">Occurring</string>
    <string name="message_recover">Restored</string>
    <string name="message_alarm_info">Alarm details</string>
    <string name="message_alarm">Alarm</string>
    <string name="message_alarm_malfunction">Malfunction</string>
    <string name="messagealarm_details_content">Alarm content</string>
    <string name="messagealarm_details_device">Alarm device</string>
    <string name="message_alarm_detailsaffect_region">Impact area</string>
    <string name="message_alarm_detailspower_station_location">Power station location</string>
    <string name="message_alarm_details_time">Alarm time</string>
    <string name="message_alarm_details_back">Back</string>
    <string name="message_alarm_details_resolved">Solved</string>
    <!--我的-->
    <string name="me">我的</string>
    <string name="me_set">设置</string>
    <string name="me_regard">关于</string>
    <string name="set_account">账号安全</string>
    <string name="set_nickname">昵称</string>
    <string name="set_close_account">注销账号</string>
    <string name="set_message_setting">消息设置</string>
    <string name="set_push_notification">推送消息</string>
    <string name="set_alarm_message">报警消息</string>
    <string name="set_general_setting">通用设置</string>
    <string name="set_multilingual">多语言</string>
    <string name="set_data_centre">数据中心</string>
    <string name="set_system_rights_managemen">系统权限管理</string>
    <string name="set_3_msg_sharing">第三方信息共享清单</string>
    <string name="set_account_security">账号与安全</string>
    <string name="set_temperature_unit">温度单位</string>
    <string name="set_logout">退出登录</string>
    <string name="set_privacy">隐私设置</string>
    <string name="set_nickname_modification">昵称修改</string>
    <string name="set_user_management">用户管理</string>
    <string name="set_message_center">消息中心</string>
    <string name="me_personal_data">个人资料</string>
    <string name="me_personal_data_portrait">头像</string>
    <string name="me_personal_data_user_name">用户名</string>
    <string name="me_personal_data_role">角色</string>
    <string name="me_personal_data_super_admin">超级管理员</string>
    <string name="me_personal_data_photograph">拍照</string>
    <string name="me_personal_data_select_album">从相册中选择</string>
    <string name="set_email_address">电子邮箱</string>
    <string name="set_not_bind">未绑定</string>
    <string name="set_language_choice">语言选择</string>
    <string name="set_c">℃(摄氏度)</string>
    <string name="set_f">℉(华氏度)</string>
    <string name="set_change_bind_phone_number">修改手机号码</string>
    <string name="set_change_bind_mail">修改邮箱地址</string>
    <string name="set_bind_phone_succeed">绑定手机号成功.</string>
    <string name="set_bind_mail_succeed">绑定邮箱成功.</string>
    <string name="me">Mine</string>
    <string name="me_set">Settings</string>
    <string name="me_regard">About</string>
    <string name="set_account">Account Security</string>
    <string name="set_nickname">Nickname</string>
    <string name="set_close_account">Logout Account</string>
    <string name="set_message_setting">Message Settings</string>
    <string name="set_push_notification">Push Notifications</string>
    <string name="set_alarm_message">Alert Messages</string>
    <string name="set_general_setting">General Settings</string>
    <string name="set_multilingual">Multi-language</string>
    <string name="set_data_centre">Data Center</string>
    <string name="set_system_rights_managemen">System Permissions Management</string>
    <string name="set_3_msg_sharing">Third-Party Information Sharing List</string>
    <string name="set_account_security">Account and Security</string>
    <string name="set_temperature_unit">Temperature Unit</string>
    <string name="set_logout">Log Out</string>
    <string name="set_privacy">Privacy Settings</string>
    <string name="set_nickname_modification">Nickname modification</string>
    <string name="set_user_management">User management</string>
    <string name="set_message_center">Message center</string>
    <string name="me_personal_data">Personal information</string>
    <string name="me_personal_data_portrait">profile photo</string>
    <string name="me_personal_data_user_name">Username</string>
    <string name="me_personal_data_role">Role</string>
    <string name="me_personal_data_super_admin">Super administrator</string>
    <string name="me_personal_data_photograph">Take a photo</string>
    <string name="me_personal_data_select_album">Choose from album</string>
    <string name="set_email_address">Email</string>
    <string name="set_not_bind">Not bound</string>
    <string name="set_language_choice">Language selection</string>
    <string name="set_c">°C (Celsius)</string>
    <string name="set_f">F (Fahrenheit)</string>
    <string name="set_change_bind_phone_number">Modify phone number</string>
    <string name="set_change_bind_mail">Modify email address</string>
    <string name="set_bind_phone_succeed">Phone number bound successfully.</string>
    <string name="set_bind_mail_succeed">Email bound successfully.</string>
    <!--app更新-->
    <string name="app_version_number">版本号</string>
    <string name="app_scan_code_download">扫码下载智慧能源APP</string>
    <string name="app_version_upgrade">版本更新</string>
    <string name="app_new_version">已经是最新版本</string>
    <string name="app_service_agreement">服务协议</string>
    <string name="app_privacy_policy">隐私政策</string>
    <string name="app_update_now">立即更新</string>
    <string name="app_cancel_update">取消更新</string>
    <string name="app_discover_new_version">发现新版本</string>
    <string name="app_be_updating">正在更新</string>
    <string name="app_stop_current_download">是否停止当前下载?</string>
    <string name="app_version">版本</string>
    <string name="app_package_size">大小</string>
    <string name="app_update_content">为了正常升级河东APP,请点击设置按钮,允许安装未知来源应用,本功能只限用于河东APP版本升级,Android 11版本及以上需要在授权之后重新下载安装。</string>
    <string name="app_update_fail">授权失败,无法安装应用</string>
    <string name="app_version_number">Version number</string>
    <string name="app_scan_code_download">Scan to download the Smart Energy App</string>
    <string name="app_version_upgrade">Version update</string>
    <string name="app_new_version">Already the latest version</string>
    <string name="app_service_agreement">Service agreement</string>
    <string name="app_privacy_policy">Privacy policy</string>
    <string name="app_update_now">Update now</string>
    <string name="app_cancel_update">Cancel update</string>
    <string name="app_discover_new_version">New version found</string>
    <string name="app_be_updating">Updating</string>
    <string name="app_stop_current_download">Stop current download?</string>
    <string name="app_version">Version</string>
    <string name="app_package_size">Size</string>
    <string name="app_update_content">In order to upgrade the HDL APP normally, please click the Settings button to allow the installation of applications from unknown sources. This function is only available for APP upgrades. Android versions 11 and above need to be re-downloaded and installed after authorization.</string>
    <string name="app_update_fail">Authorization failed, unable to install the application</string>
    <!--ota-->
    <string name="ota_binding_cloud_upgrade_fails">逆变器没绑定过,升级失败.</string>
    <string name="ota_not_cloud_upgrade_fails">逆变器没连上云,升级失败.</string>
    <string name="ota_binding_cloud_upgrade_fails">The inverter has not been bound before, upgrade failed.</string>
    <string name="ota_not_cloud_upgrade_fails">The inverter is not connected to the cloud, upgrade failed.</string>
    <!--uin-->
    <string name="uni_open_error">页面初始化中 请等待5秒再点击</string>
    <string name="uni_open_error">Page initializing, please wait 5 seconds before clicking</string>
    <!--弹框-->
    <string name="loading_cancel">取消</string>
    <string name="loading_affirm">确认</string>
    <string name="loading_agree">同意</string>
    <string name="loading_on_agree">不同意</string>
    <string name="loading_privacy">隐私权政策及服务条款</string>
    <string name="loading_privacy_server">为了更好的保障您的合法权益,请您阅读并同意以下协议《隐私权政策》和《服务条款》</string>
    <string name="kill_app">再按一次退出应用</string>
    <string name="loading_not_supported">抱歉,暂不支持.</string>
    <string name="loading_title_tip">提示</string>
    <string name="loading_app_restart">确认后App将会重新启动.</string>
    <string name="loading_log_out">确认退出登录?</string>
    <string name="loading_cancel">Cancel</string>
    <string name="loading_affirm">Confirm</string>
    <string name="loading_agree">Agree</string>
    <string name="loading_on_agree">Disagree</string>
    <string name="loading_privacy">Privacy policy and terms of service</string>
    <string name="loading_privacy_server">To better protect your legitimate rights and interests, please read and agree to the following agreements: 《Privacy Policy》 and 《Terms of Service》.</string>
    <string name="kill_app">Press again to exit the application</string>
    <string name="loading_not_supported">Sorry, not supported at the moment.</string>
    <string name="loading_title_tip">Prompt</string>
    <string name="loading_app_restart">Confirm to restart the App.</string>
    <string name="loading_log_out">Confirm logout?</string>
    <!--    权限       -->
    <string name="camera_album_file_create_fial">文件创建失败</string>
    <string name="camera_album_file_save_fial">保存路径异常,请重试</string>
    <string name="camera_album_file_create_fial">File creation failed</string>
    <string name="camera_album_file_save_fial">Save path abnormal, please retry</string>
    <!--    权限       -->
    <!--    图片上传       -->
    <string name="camera_album_file_get_fial">图片获取失败</string>
    <string name="camera_album_system_fial">系统处理图片失败,请重试</string>
    <string name="apk_update_content">为了正常升级河东APP,请点击设置按钮,允许安装未知来源应用,本功能只限用于河东APP版本升级,Android 11版本及以上需要在授权之后重新下载安装。</string>
    <string name="apk_update_sure">设置</string>
    <string name="permission_open">请到设置中打开权限</string>
    <string name="camera_album_file_get_fial">Failed to retrieve image</string>
    <string name="camera_album_system_fial">System failed to process image, please retry</string>
    <string name="apk_update_content">In order to upgrade the HDL APP normally, please click the Settings button to allow the installation of applications from unknown sources. This function is only available for APP upgrades. Android versions 11 and above need to be re-downloaded and installed after authorization.</string>
    <string name="apk_update_sure">Settings</string>
    <string name="permission_open">Please authorize permission in settings</string>
    <string name="please_go_set_permissions">Please set permissions.</string>
    <string name="residue"> Remaining time:</string>
    <string name="minute">minutes</string>
    <string name="event"> Event</string>
    <string name="The_gateway_cannot_be_found_locally">Unable to find gateway under local network</string>
</resources>
app/src/main/res/values-zh/strings.xml
@@ -64,9 +64,12 @@
    <string name="verification">验证码</string>
    <string name="home_phone_number">区号</string>
    <string name="home_chinese_mainland">中国大陆</string>
    <string name="home_password_changed_successfully_log_in">密码修改成功,将重新登录.</string>
    <string name="home_old_password_not_new_password">原密码和新密码不能一样.</string>
    <!--我的电站-->
    <string name="power_shome_page">首页</string>
    <string name="power_station">电站</string>
    <string name="power_station_me">我的</string>
    <string name="my_power_station">我的电站</string>
@@ -192,5 +195,11 @@
    <string name="apk_update_sure">设置</string>
    <string name="permission_open">请到设置中打开权限</string>
    <string name="please_go_set_permissions">请前往设置权限</string>
    <string name="residue">剩余</string>
    <string name="minute">分钟</string>
    <string name="event">事件</string>
    <string name="The_gateway_cannot_be_found_locally">本地找不到网关</string>
</resources>
app/src/main/res/values/strings.xml
@@ -64,9 +64,12 @@
    <string name="verification">验证码</string>
    <string name="home_phone_number">区号</string>
    <string name="home_chinese_mainland">中国大陆</string>
    <string name="home_password_changed_successfully_log_in">密码修改成功,将重新登录.</string>
    <string name="home_old_password_not_new_password">原密码和新密码不能一样.</string>
    <!--我的电站-->
    <string name="power_shome_page">首页</string>
    <string name="power_station">电站</string>
    <string name="power_station_me">我的</string>
    <string name="my_power_station">我的电站</string>
@@ -192,5 +195,11 @@
    <string name="apk_update_sure">设置</string>
    <string name="permission_open">请到设置中打开权限</string>
    <string name="please_go_set_permissions">请前往设置权限</string>
    <string name="residue">剩余</string>
    <string name="minute">分钟</string>
    <string name="event">事件</string>
    <string name="The_gateway_cannot_be_found_locally">本地找不到网关</string>
</resources>